EDIT: I got it working, it was the TRISB line, I didnt update it for the inputs past 0. So I added TRISB = %11111111 and now its reading the data, its funny though i must have some wires in wrong place because only one row reads corrects numbers all the others are way off, will have to check pinouts of keypad. but its working now
BEFORE EDIT:
Ok it was a bit confusing to make sure the INT was firing so I moved the code down to the INT, it places a 0 on LCD when a key is pressed so the interupt is working, but its not reading data on portB
heres a code update
Code:include "LCD_D.bas" INCLUDE "DT_INTS-18.bas" ; Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts TRISD = 0 ' PORTD is Display TRISB = 1 ' PORTB is Input asm INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler INT0_INT, _KEYPRESS, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM @ INT_ENABLE INT0_INT ; enable external (INT) interrupts X VAR BYTE : X = 0 LCDOUT $FE, 2 Pause 1000 Main: PAUSE 500 GOTO Main End '---[INT - interrupt handler]--------------------------------------------------- KEYPRESS: X = PORTB X = X >> 4 LCDOUT $FE, 2 LCDOUT $FE, $80 LCDOUT DEC X @ INT_RETURN





Bookmarks