TX_INT - USART Transmit Interrupt for HSEROUT communication
Uses PIR1,TXIF & PIE1,TXIE Registers and Control Bits
DT's Interrupts MUST be used with PicBasic Pro and MPASM.
TX_INT will NOT work with Serout or Serout2
The following block of instructions will establish the interrupt used and the PBP label (your ISR) to jump to once interrupt occurs. Remember; all PBP labels or variables used inside ASM code blocks must be preceded by the underscore,( _SndData). All instruction to the interrupt processor should be in ASM and preceded by the @ symbol and to the far left column of the editor if not included in other ASM code blocks.
@ INT_DISABLE TX_INT
INT_LIST macro ;IntSource Label, Type, ResetFlag? INT_Handler TX_INT _SndData PBP Yes endm INT_CREAT ;Creates the interrupt processor INT_ENABLE TX_INT ;enables TX interrupts
INT_CREATE ;Creates the interrupt processor
INT_ENABLE TX_INT – enable TX interrupt
INT_DISABLE TX_INT – disable TX interrupt.
INT_CLEAR TX_INT – clear flags
INT_RETURN ------- To restore and return to the program where interrupt was made.