IN THE KNOW
Go to bottomPage: 12
TOPIC:
*
#1010
Re:ADC single-shot on Z8F042A 11 Months ago Karma: 0
Like I said the fluctuation was in my circuit. So, I fixed that problem, but now I'm not getting an accurate ADC value. It is off by 4% even with the calibration bytes used.
Chris (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1011
Re:ADC single-shot on Z8F042A 11 Months ago Karma: 0
Ok, so what do your calibration bytes read? Have you worked through the calibration algorithm manually and checked that it matches up?
Jack (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1017
Re:ADC single-shot on Z8F042A 10 Months, 3 Weeks ago Karma: 0
Yeah, stepped through the calibration and its applying the bytes per the algorithm I duplicated from the App Note. So, I kind of question the algorithm itself. It should be increasing the ADC count to get to the right value, but in one part of the algorithm it is actually subtracting/reducing the value.
Chris (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1018
Re:ADC single-shot on Z8F042A 10 Months, 3 Weeks ago Karma: 0
I'm using a z8F2480 and had good results with my ADC, but I was using an external vref. We have some voltage dividers to detect board rev and current role. I found my calculations work out to within 1/2 counts of the measurement. I'll reread my specs, I didn't notice an ADC calibration step.

However, when I tried to apply the calibration bytes algorithm for the internal temperature sensor I couldn't get reasonable similarity between any of the 3 devices I tried.
mr (User)
Senior Boarder
Posts: 41
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1019
Re:ADC single-shot on Z8F042A 10 Months, 3 Weeks ago Karma: 0
I'm using the internal 2.0V reference. Maybe I should try an external Vref. I might try my 3.0V supply voltage.
Chris (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1020
Re:ADC single-shot on Z8F042A 10 Months, 3 Weeks ago Karma: 0
I see that the Z8F042A has a little different description for the ADC in the Specifications than the Z8F2480. I'm going to read that and the app note and see if I get any new inspiration.

My desire to use the temperature feature was a minor feature so I abandoned it. I'd still like to conquer it.

If your test code is short, try asking support to explain the discrepancy.
mr (User)
Senior Boarder
Posts: 41
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12