ADC on BCM20732

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I am having some difficulty with using the ADC on the 20732 chip. I checked the Hardware Interface Guide and it seems the only code you have to use to read from the ADC is the following:

adc_readVoltage(ADC_INPUT_CHANNEL);

is that correct? Does there need to be any type of configuring to make sure the pin is configured to be used as an ADC input?

I ask because I get the same adc reading whether I choose 2.4V or 3.6V as a reference voltage, which I'm pretty sure is not right.

Your help is greatly appreciated,

Gurpal

0 Likes
1 Solution

Once initialized (and so calibrated or you perform your own calibration using your own reference input if required), you don't need to configure a GPIO separately as an ADC input. The ADC input channel parameter to readVoltage is sufficient. This will internally configure the GPIO as an ADC input, turn on the ADC, acquire a sample and then turn off the ADC.

View solution in original post

0 Likes
4 Replies