Problem #1: RA0 (and more pins) are anlog inputs by default at power-up, and all pins configured as analog inputs will read 0 when used for digital I/O.
Solution = ANSEL0 = 0
Problem #2: This can cause read-modify-write issues since you have all pin aliases pointing to port pins VS port LATches;
Low led1
Low led2
Low led3
Low led4
Low led5
Low led6
Low led7
Low led8
Low led9
Low led10
Low led11
Low led12
Change your pin aliases to LAT like this and include the = sign;
Symbol led1 = LATB.5 'OUT, etc.
Bookmarks