How to integrate peripheral ADC?

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

How to integrate peripheral ADC?

ソリューションへジャンプ
864件の閲覧回数
ZD-Zhengkun
Contributor II

Hello, dear working staffs and others,

I'm currently using the MPC5748G DEVKIT and I want to convert the analog signal from the peripheral potentiometer. I've checked several examples, but they are all using the Potentiometer on the board (ADC0 CH9). 

Thus, I want to ask about the possibility to include the analog signal in PG13 and convert the signal using ADC1

ZD-Zhengkun_0-1617810721194.png

And if possible, how should I know the corresponding channel number since I want to enable the channel but I can't find the information about the channel number.

ADC_DRV_EnableChannel(INST_ADCONV1, ADC_CONV_CHAIN_NORMAL, ADC_CHAN_NUM);

Best regards,

Zhengkun

0 件の賞賛
1 解決策
851件の閲覧回数
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Simply connect your analog signal to pin header J14 pin 1.

petervlna_0-1617864054414.png

 

Next you need to check internal routing of ADCs: In this case it is channel35

 

ADC.jpg

 as you can see from routing table:

Screenshot_1.jpg

Last thing you need to se it APC bit in SUIL unit for corresponding MCSR register. Which is in this case MCSR 109.

Screenshot_2.jpg

After setting this you are ready for measurement of PG[13] channel via ADC1 channel 35.

Best regards,

Peter

 

 

 

元の投稿で解決策を見る

3 返答(返信)
849件の閲覧回数
ZD-Zhengkun
Contributor II

Thank you, this answer solved my problem perfectly

0 件の賞賛
852件の閲覧回数
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Simply connect your analog signal to pin header J14 pin 1.

petervlna_0-1617864054414.png

 

Next you need to check internal routing of ADCs: In this case it is channel35

 

ADC.jpg

 as you can see from routing table:

Screenshot_1.jpg

Last thing you need to se it APC bit in SUIL unit for corresponding MCSR register. Which is in this case MCSR 109.

Screenshot_2.jpg

After setting this you are ready for measurement of PG[13] channel via ADC1 channel 35.

Best regards,

Peter

 

 

 

837件の閲覧回数
ZD-Zhengkun
Contributor II

Thank you for your reply, now I got the ADC running.

But I still have some questions. According to the reference manual, the ADC1 should be a 12 bits ADC, but the conversion result I got is only 8 bits result. The input ranges from 0 volts to 3,3 volts.

Did I make the configuration wrong or the input voltage signal is not high enough? Could you please give me a hint?

Best regards!

0 件の賞賛