Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I don't do much software.
Can't you declare a 16 bit INT at address ADRESL? or is it ADRESH??? Any way the 16 bit will cover both H and L.
In C18 and XC8 ADRES is the 16 bit value. With other compilers you can do,
int ADRES @ &ADRESL;
The datasheet said:EQUATION 19-1: ACQUISITION TIME
TACQ = Amplifier Settling Time + Holding Capacitor Charging Time + Temperature Coefficient
= TAMP + T C + T COFF
EQUATION 19-2: A/D MINIMUM CHARGING TIME
VHOLD = (VREF – (VREF /2048)) • (1 – e (-TC/C HOLD (RIC + R SS + R S)))
or
TC = -(CHOLD )(RIC + R SS + R S) ln(1/2048)
EQUATION 19-3: CALCULATING THE MINIMUM REQUIRED ACQUISITION TIME
TACQ =TAMP + T C + T COFF
TAMP =0.2 µs
TCOFF = (Temp – 25 °C)(0.02 µs/ °C)
(85°C – 25°C)(0.02 µ s/ °C)
1.2 µs
Temperature coefficient is only required for temperatures > 25 °C. Below 25°C, T COFF = 0 ms.
TC = -(CHOLD )(RIC + R SS + R S) ln(1/2047) µs
-(25 pF) (1 kΩ + 2 k Ω + 2.5 kΩ) ln(0.0004883) µs
1.05 µs
TACQ =0.2 µs + 1 µs + 1.2 µs
2.4 µs