Hi All,
As I am working on Slope ADC configuration as described by AN863
- Connect the supply voltage through the ref: resistor Rref and let the capacitor chraged until it reaches threshold voltage Vth, the charge time T1 is recorded.
- Discharge the capacitor and then connect the supply voltage again through unknown resistor Rx, and let the capacitor charged until it reaches threshould voltage Vth, charge time T2 is then recorded.
And theoractically, Rx = (T2/T1) * Rref
I used C = 0.47 uF, Rref = 200 ohms, Vth = 2.02V, Vsupply = 3.08V (I use PIC18F45k20 port RA1 and RA2 to supply voltage to RC ckt, and RA0 as the comparator input).
Results are not as expected.
When Rref = 200 ohms with C=0.47 uF , time T1 is measured to be 138 us to reach 2.02V. Again, when Rx = 360,540 ohms, with the same capacitor
0.47uF, time T2 is measured to be 200,292 us. The time Ratios T2/T1 does not match the time ratio in this experiment.I understand that the source characteristics of the I/O port in the MCU affects the charge time behaviour but I am not sure how exactly it relates and I do not know how to model the circuit so as for me to calculate predictable results.
Any suggestions?
Regards