? reallyRA3 or LATA.3 how you call it, which is input only, ADC works just fine and does not hog current.
RA3 is not an analogue input
the only way a pic I/O pin will sink 25ma is :- if its an output, damaged or fed more volts than vdd
? reallyRA3 or LATA.3 how you call it, which is input only, ADC works just fine and does not hog current.
RA3 is not an analogue input
the only way a pic I/O pin will sink 25ma is :- if its an output, damaged or fed more volts than vdd
So, if I understood correctly, I need to set TRISA correctly and that is the issue?
any pin that is set to analogue needs to have its corresponding tris bit set
from the data sheet
The TRISA register (Register 12-3) controls the
PORTA pin output drivers, even when they are being
used as analog inputs. The user should ensure the bits
in the TRISA register are maintained set when using
them as analog inputs. I/O pins configured as analog
input always read ‘0’.
Yes, thanks, now that clear, changed TRISA to TRISA=%00111101 and it now works just fine!
Just it is a bit silly, why it can be possible to have same pin both as ADC IN and LOGIC OUT at same time (circuitry-wise)
Just it is a bit silly, why it can be possible to have same pin both as ADC IN and LOGIC OUT at same time (circuitry-wise)
why is that you can drive a car for hundreds of miles in low gear , and with the handbrake on ?
is that any different ?
just because you're in the drivers seat with the motor running does not mean you are proficient
That's not fair comparison, the situations is like when you can have zipper closed on your pants, but your junk still hanging from zipper
A side question, I'm going to monitor 9VDC battery voltage via ADCIN. To reduce current consumption, I'll have to increase resistance of both resistors, but this will also make circuit less noise proof. How do you think, what will be the gold cut in that case?
Maybe this will help you.
http://electronics.stackexchange.com...ery-monitoring
Bookmarks