Hi,
I need to set port RA3 (pin 5 on 18f252) in analog mode to read a level of battery.
Now I have ADCON1 = 7 (all input in digital mode)
What Value I need for ADCON0 and ADCON1 to get RA3 in analog mode only?
Thanks
Roberto
Hi,
I need to set port RA3 (pin 5 on 18f252) in analog mode to read a level of battery.
Now I have ADCON1 = 7 (all input in digital mode)
What Value I need for ADCON0 and ADCON1 to get RA3 in analog mode only?
Thanks
Roberto
There's no way to set ONLY AN3 as analog input on a 252.
The closest you can get is ADCON1 = %10000100 which sets AN0, AN1 and AN3 to analog mode.
If you can move that input to AN0, then you can set ONLY AN0 to analog mode with ADCON1 = %10001110.
<br>
DT
Bookmarks