I am using a PIC 16F628A processor, and am trying to learn how to use DT's Interrupts but here is my problem:
If TRISB = %11111110 and PORTB %00000001 that should mean that bit 0 of PORTB is an ouput all others are input and with PORTB = %00000001 that means bit 1 is equal to one meaning high 5v and all others low, CORRECT???? Well, after check with my meter PORTB 0-7 are high or shall I say 5v, running the code below, I am experimenting with Interrupts on PORTB 4-7 wanting to detect when bits 4-7 go low and with keypad connected to PORTB 1-7, Bit 0 is an output set high going through forward through diode anode to pins 4-7 when button is pressed that particular bit is pulled low....
DEFINE OSC 4
CMCON = 7
VRCON = 0
pauseus 10
TRISA = %00000110
TRISB = %11111110
PORTA = %00000000
PORTB = %00000001
OPTION_REG.7 = 0 'enable pullups
OPTION_REG.6 = 0 'trigger on falling edge
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, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM

@ INT_ENABLE RBC_INT ; enable external (INT) interrupts

Main:
PAUSE 1
GOTO Main

'---[INT - interrupt handler]---------------------------------------------------
ToggleLED1:
TOGGLE LED
PAUSE 50
@ INT_RETURN

My explanation my seem confusing but it is early and I haven't had my COFFEE!!!!

Thanks