Hmmm, came back here today to focus on the post here from Bruce but it seems to have vanished, or am I losing my mind? Maybe its both
Anyhow, it was mentioned that so to speak that I should take a snapshot of PortB, I am so lost. If on power up PortB.0 is high and pullups are enabled, on the rest of the pins: TRISB = %11111110 PortB = %00000001 then with my meter focusing on pins 4-7 shows 5VDC or logic HIGH, should I do this:
WHILE (portb >> 4) != 15
pause 20
wend
INTCON.0 = 0
return
or substitute 15 for a 0?
Seems it would be 15 but with that I apparently staying in my interrupt routine.
I've been experimenting with ON INTERRUPT and Darryl Taylor's Instant Interrupts:
DEFINE OSC 4
CMCON=%00000111
VRCON = 0
PAUSEus 10
TRISA = %00000110
TRISB = %11111110
PORTA = %00000000
PORTB = %00000001
OPTION_REG.7 = 0
OPTION_REG.6 = 0
INTCON = %00001000
led var portA.3
INCLUDE "DT_INTS-14.bas" ; Base Interrupt System
INCLUDE "ReEnterPBP.bas" ; Include if using PBP interrupts
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler RBC_INT, _check, PBP, yes
endm
INT_CREATE
ENDASM
@ INT_ENABLE RBC_INT
PAUSE 50
cycle:
gosub readportb
HIGH led
pause 100
LOW led
pause 100
@ Sleep
@ Nop
@ Nop
goto cycle
readportb:
WHILE (portb >> 4) != 15
PAUSE 20
WEND
INTCON.0 = 0
return
check:
PAUSE 250
WHILE (portb >> 4) != 15
PAUSE 20
WEND
@ INT_RETURN
Any Suggestion, preferably in Crayola so its clear?
Thanks
Bookmarks