Originally Posted by
mackrackit
Intcon.5 = 1 'enable tmr0
Unfortunately this didn't do anything
I just tested this code on a 16F870 and a 16F628A:
Code:
led var PORTB.7
OPTION_REG = $7f ' Enable PORTB pullups
On Interrupt Goto myint ' Define interrupt handler
INTCON = $90 ' Enable INTE interrupt
loop: High led ' Turn LED on
Goto loop ' Do it forever
' Interrupt handler
Disable ' No interrupts past this point
myint: Low led ' If we get here, turn LED off
Pause 500 ' Wait .5 seconds
INTCON.1 = 0 ' Clear interrupt flag
Resume ' Return to main program
Enable
I get the error in the PROGRAMMER in both cases. The error is in the code verification stage.
Why would the programmer give this type of error, as if the code was not being written properly to the PIC? If I remove the "ON INTERRUPT" line, the code saves perfectly. I have been using this programmer for a while and had no problems until this one.
Is the PICBASIC compiler inserting code in a non-programable area or something?
Bookmarks