Dave I tried that, it gave me really erratic results, numbers were all over the place even above 16. , so i disconnected the 4 data lines to the pic, and tested the lines output
on the 922 Chip output, with 4 LEDS, pressing any key on pad repeatedly should output the same leds every time, however they blink like christmas lights.
on the PIC (when INT fired) it outputs 0, 16, 06 randomly each time INT fires.
tied the datalines back and now PIC does nothing till they are removed???
Here is the code I am using, although this doesnt solve the issue with the 922 chip outputting random bits
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: LCDOUT $FE, 2 LCDOUT $FE, $80 LCDOUT DEC X PAUSE 500 GOTO Main '---[INT - interrupt handler]--------------------------------------------------- KEYPRESS: X = PORTB <<4 '922 Data lines 0,1,2,3 hooked to 4,5,6,7 of PORTB @ INT_RETURN




Bookmarks