Hi there,
i wrote my first program and i donīt understand, how to define the interrupts.
I īve set RB7 and RB6 as inputs and theyīre normally high "1".
If one of these inputs change the state, then i need to go to the interrupt routine. Can somebody help me how to define interrupts in PicBasic and which options needed for my example ?
Thanks a lot
Robson
ADCON1 = %111
DEFINE OSC 4
TRISA = %00110000
TRISB = %11000000 ' RB7 & RB6 as inputs
TRISC = %00000000
ENABLE
ON INTERRUPT GOTO myint
INTCON = ??? ' Donīt know what comes here
OPTION_REG = ' ???
main:
...
...
GOTO main
DISABLE
myint:
LED = 1
RESUME
ENABLE
Bookmarks