Change the "[\code]" to a forward "[/code]".
Code:'configuración ANSEL = 0 'I/O digitals OPTION_REG = 7 'Enable pullups IOCA.0 = 1 'Enable Interrupt on Change for RA0 WPUA.0 = 1 'Enable pull up RA0 TRISC = 0 'portC output TRISA = 7 'portA <2:0> input <5:3> output INTCON.0 = 0 'clear IOC flag INTCON.3 = 1 'Enable IOC interrupt INTCON.7 = 1 'Enagle GIE 'variables I var byte 'missmatch variable for IOC inicio: if INTCON.0 = 1 THEN 'Change on portA ocurred? PORTC.5 = 1 'turn On led pause 500 'wait half second PORTC.5 = 0 'turn On led I = PORTA 'end missmatch INTCON.0 = 0 'clear IOC flag for next interrupt ELSE 'if no change is ocurred PORTC.5 = 0 'led continues off ENDIF ' GOTO inicio 'loop




Bookmarks