Multichannel ATD in mc9s12xep100

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

Multichannel ATD in mc9s12xep100

774件の閲覧回数
mrunaljoshi
Contributor II

Hi !

I am working on the Demoboard for MC9S12XEP100 . I need 3 atd channels for my project but the results of conversion for all three seem to be getting stored in ATD0DR0 i.e the result register for channel 0 only. I have tried the sequence storage of the results but doesnt seem to work .  Can someone please help ?

Thanks

ラベル(1)
0 件の賞賛
返信
1 返信

673件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Mrunal,

I wonder you didn't select the correct channel before getting value from ATD.

for example, to get the correct value from channel 1, we need:

/* Run measurement of channel 1 with set wait for result */

    err = AD2_MeasureChan(TRUE,1U);

    /* Get result of channel 1 justified to left*/

    err = AD2_GetChanValue16(1U,&Value1);

I suggest you check sample code under

{CW5.1 install folder}\ProcessorExpert\Projects\Test projects\ADC

can this help?


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信