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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

2,894件の閲覧回数
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 返答(返信)

593件の閲覧回数
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 件の賞賛
返信

593件の閲覧回数
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 件の賞賛
返信

593件の閲覧回数
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 件の賞賛
返信