(first interrupt program attempt - thanks)

I am trying to sense an interrupt signal on portb0 and then read portb1 and portb2 as inputs.

Is this possible?

This is a rotary encoder that is put thru a flipflop and I have used both outputs thru diodes as my interrupt trigger.

It was working, but not correctly. I'm not sure if my board is noisy or if the program is not working correctly.

I would like to know if intcon is set properly and if I need to set the register to make high priority interrupts.

I'm a little confued about the datasheet, it doesn't seem to specifically talk about using portb<0-2>. And how does the pic know to watch for an interrupt on portb0?

Thanks. /code below

INCLUDE "modedefs.bas"
DEFINE LOADER_USED 1
DEFINE OSC 40
value var byte
cw var portB.1
ccw var portB.2
INTCON = %01001000
TRISB.1 = 1
TRISB.2 = 1

value=0
begin:
on interrupt goto myint
GOTO begin

'Interrupt handler
Disable
myint:

value = value + cw - ccw

serout2 portc.6, 16468, [dec3 value,13,10]
INTCON.1 = 0
resume
Enable

END

btw - is there a way to reset the printing using serout2 to the home position?