-
PIC16F877 Weird behavior
Hi guys,
I am experiencing a weird behavior of the pic16F877.
I have 24 led(s) That I have distributed on port D, C, E, and A.
I wrote a code were the first 12 Leds will trun ON, and after every PAUSE 500, A LED will trun off and another LED will trun ON from the second set of 12 LEDs.
Everything went well except 1 LED didn't turn ON at all. (I checked to see if it is burnt, but it is not). The LED was on PORTA.4
Then I wrote another code, where all 24 LEDs will turn ON, and They will turn off, one at a time.
I had a weird behavior: 6 LEDS didn't work and they are at PORTA.2, .3, .4, .5, PORTE.0, .2
Have anyone experienced this behavior?
Please if you have any advice or answer I will appreciate it.
Thanks
-
is there any chance you forgot to disable the analog converters?
ADCON1=7
PortA Doesn't Work & Common 8-Bit PIC® Microcontroller I/O Pin Issues
http://www.picbasic.co.uk/forum/showthread.php?t=561
If i remember correctly, PORTA.4 is an open-drain output, so the LED has to be connected between Vdd and PORTA.4
Pin RA4 doesn't work
http://www.picbasic.co.uk/forum/showthread.php?t=562