I am trying to use the ADC on the RCM4200 while using the dev kit. I have tried the sample programs included with Dynamic C, and they all show have the same problem. When reading the analog value from the ADS7870, the raw values returned are 0 regardless of the voltage applied to the inputs.
Poking around on the RCM, I can see that the Vref voltage is being output correctly. The voltage input is also getting to the ADS7870. However, the digital values returned are always 0 (or very low.) They do not correspond with the voltage being input. Anyone have any ideas?
If you have your RCM 4200 mounted on the prototyping board, then there are two ways to connect to the ADS7870. Applying a signal to the analogue input header on the side of the board uses an 11:1 attenuator circuit and low pass filter, whereas connecting directly to the development board would require that you implement this 11:1 attenuator.
If you were using anaInVolts() then I would suggest checking calibration, but it sounds like your using anaIn().
Perhaps double checking that you are using the correct gain code would yield something.
I experienced the same problem as what you have experienced. But the problem occurs on RCM4510w instead of RCM4200…I have tried different channels and different microcontrollers but the results remain the same as 0.