If you read the code inside your 'LOOP', there's nothing there to tell the pin to go low if the input goes low...therefore...
DEFINE OSC 8
TRISA.1 = 1
TRISA.2 = 0
LOOP:
PORTA.2 = PORTA.1
GOTO LOOP
Also, check your datasheet regarding PortA and analog settings, section 12.0 of the PIC16F88 datasheet. You might see something there that might throw a wrench into your master plan!![]()
Bookmarks