I have had some issues with the different versions of PBP so I upgraded to Vs PBPX 3.1.0.4
This program compiles just fine but it does not enter the interrupt on RX
The exact same code runs in the 18F1320 except the OSCCON is $60 for the 18F1320 and $D2 for the 18F26K22.Code:INCLUDE "modedefs.bas" include "ALLDIGITAL.pbp" INCLUDE "C:\PBP\DT_INTS-18.bas" ; Base Interrupt System INCLUDE "C:\PBP\ReEnterPBP-18.bas" ; Include if using PBP interrupts Define PULSIN_MAX 1000 DEFINE HSER_RCSTA 90h 'Hser receive status init DEFINE HSER_TXSTA 24h 'Hser transmit status init DEFINE HSER_BAUD 9600 'Hser baud rate DEFINE HSER_SPBRG 25 DEFINE HSER_CLROERR 1 DEFINE OSC 4 OSCCON =$D2 'clock speed mem1 var byte ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler RX1_INT, _read_serial, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM @ INT_ENABLE RX1_INT ; enable external (RX) interrupts MAIN: SEROUT2 PORTB.0 ,16468,["here",cr,cr] pause 500 GOTO MAIN read_serial: hserin 250 , NoRS232,[mem1,mem1] serout2 PORTB.0,16468,["got it",cr] Pause 1000 @ INT_RETURN NoRS232: serout2 PORTB.0,16468,["No rs232",cr] @ INT_RETURN
Does anyone know where I might be needing to look?
Mike




Bookmarks