Sample C code for reading the ADC on an HCS08 processor?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Sample C code for reading the ADC on an HCS08 processor?

3,508 次查看
DB
Contributor I
Can anyone point me to some sample C code showing how to sample the ADC on an HCS08 microcontroller (declare the variables and types, read the ADC, assign the value to the variable? I'm able to get the ADC to sample the input signal but the data in my debugger doesn't seem to make sense.
 
I'm using CodeWarrior 5.1and running a MC9S08GB60 processor on an M68DEMO908GB60 demo board.
 
Excuse the newbie question...I'm a hardware apps engineer just learning to code this product.
 
Thanks.
 
标签 (1)
0 项奖励
回复
3 回复数

1,207 次查看
DB
Contributor I
Thanks, Peg and UcTechnoGeek.
 
I am using the 9S08GB60 but the code looks similar.  I'll keep plugging and hopefully come up with ADC values displaying in my debugger window that make sense.
 
- DB
0 项奖励
回复

1,207 次查看
UcTechnoGeek
Contributor II
Here is a project that I've used for testing.
 
It uses the ADC on a 9S08GQ8 board.
 
It uses an older CW version, but should still work
 
uCTechnoGeek
0 项奖励
回复

1,207 次查看
peg
Senior Contributor IV
Hi and welcome DB,
 
Take a look at the QG4/8 Quick Start Guide in the sticky messages at the top of this forum.
 
0 项奖励
回复