Hello everyone,
I've come acrossed a bit of conflicting documentation regarding the ADC and VREFs of the MCF5213. For starters the CAL register and surrounding illustrations in the HW Reference manual Rev3 from 3/2007 seems to indicate this processor supports both internal and external VREFs - however the internal VREF voltage is never given. Further confusing the issue is the CAL register definition which has INTERNAL and AN2/AN6 given for the options. Where does AN2/AN6 come from? Is this an error? I thought VRH and VRL were the Vref pins?
In our design we use a 3.3V supply for the Coldfire and a 3.0V Vref for the VREFH pin which is connected to the VDDA pin. I later found the errata showing that VREF needs to be 3.1V or higher to avoid random crazy values from coming out of the ADC - a problem we've not seen but are going to redesign to avoid.
The reason why I'm asking for clarification is because the ADC scale seems off and noisy, and the CAL register seems broken.
- First of all I have the CAL register set to 0 which indicates an internal VREF. If I set the external vref bits the ADC fails to return anything but 0s.
- Second, the input range to the ADC is 0-3.0V to coincide with the VREF of 3.0V. However at 3.0V I'm seeing an ADC result of 3900ish - which implies a 3.3V vref is really being used. The only way this is possible is if there is an internal VREF.
- Third I'm noticing quite a bit of noise in my ADC readings that does not correlate to measured noise using a scope.
Thanks in advance for any help on this.
- Jason