PortA.0 on the 16F877A (as well as many others) is an analog input by default and as such, will not work with 'digital commands'.
You must change it to a digital input.
This is also true of many PICs with built-in ADC's.
PortA.0 on the 16F877A (as well as many others) is an analog input by default and as such, will not work with 'digital commands'.
You must change it to a digital input.
This is also true of many PICs with built-in ADC's.
>>You must change it to a digital input. (from SkiMask)
He is correct - to do this add
before your TRIS commands and all should be well (see datasheet PORTA section for explanation)Code:ADCON1 = 6
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks