How to integrate peripheral ADC?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to integrate peripheral ADC?

Jump to solution
838 Views
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 Kudos
1 Solution
825 Views
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

 

 

 

View solution in original post

3 Replies
823 Views
ZD-Zhengkun
Contributor II

Thank you, this answer solved my problem perfectly

0 Kudos
826 Views
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

 

 

 

811 Views
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 Kudos