We are using the AN0 of the microcontroller to read the RTD input. When probed the pin of the controller, the voltage appears to be 3.28v. But when we read the ADC register, the value read is 678 counts i.e, 0.05v. The reference voltage is 4.96v (Vcc).
The same problem is also seen across AN1-3. We are unable to determine the problem. Though one problem which we suspect would be that the pins might have got damaged. I am not sure whether this is possible.
We are using MC9S12C32 and Code warrior 3.1v as the IDE. We are using P&E HCS12 multilink Rev.B for programming and debugging.
The ADC register configuration is:
ATDCTL2 = 0x80;
ATDCTL3 = 0x08;
ATDCTL4 = 0x63;
ATDCTL5 = 0xA1; // For ADC channel 1
ATDCTL5 = 0xA2; // For ADC channel 2
ATDCTL5 = 0xA3; // For ADC channel 3
ATDCTL5 = 0xA4; // For ADC channel 4
We are taking the readings from ATDDR0.
Please let us know what might be the possible problem.
Thanks & regards,