AnsweredAssumed Answered

ADuC845 ADC (temp sensor) read errors

Question asked by ChrisH Employee on Jan 20, 2011
Latest reply on Jan 20, 2011 by MikeL

Having trouble applying the ADC. Everything else is up and going – can read and write to registers, GPIO, etc, so comms are good.
Just having trouble with the ADC. Trying to read the temp sensor on board as described in page 45 bottom.

 

"Note the following about the temperature sensor: When the temperature sensor is selected, user code must select the internal reference via the AXREF bit and clear the AUNI bit (ADC1CON.5) to select bipolar coding. Chop mode must be enabled for correct temperature sensor operation. The temperature sensor is factory calibrated to yield conversion results 800000H at 0°C (ADC chop on). A +1°C change in temperature results in a +1 LSB change in the ADC1H register ADC conversion result."


So, all that Clears both AXREF and AUNI , which should select the internal ref and bipolar coding. It is in chop mode. Reads the output. Regaredless of the temp (can cool spray the part but the reading doesn't change) the output in the High register of ADC1H yields 32C.


Can you provide some example c code that you know allows the ADC to work with this?

 

Thanks

Chris - (On behalf of customer)

Outcomes