I have it working with this code:
DEFINE OSC 4
CMCON=%00000111
VRCON = 0
PAUSEus 10
TRISA = %00000110
TRISB = %11110001
PORTA = %00000000
PORTB = %00000000
OPTION_REG.7 = 0
OPTION_REG.6 = 0
rf var porta.4
main:
low rf
pause 500
high rf
pause 500
goto main
Does it have something to do with me using the comparator on ra.1,ra.2? I have been reading the datasheet and it mentions ra.3,ra.4 in section5.1 PORTA and TRISA Registers, I am already using ra.3 with no problems as an output.
Bookmarks