RX_INT -- USART Transmit Interrupt for HSERIN communication
Uses PIR1,RCIF & PIE1,RCIE Registers and Control Bits.
DT's Interrupts MUST be used with PicBasic Pro and MPASM.
RX_INT will NOT work with Serin or Serin2
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,( _GetData). 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.
Example:
@ INT_DISABLE RX_INT
ASM
INT_LIST macro ;IntSource Label, Type, ResetFlag? INT_Handler RX_INT _GetData PBP Yes endm INT_CREAT ;Creates the interrupt processor INT_ENABLE RX_INT ;enables RX interrupts
ENDASM
Command functions:
INT_CREATE ;Creates the interrupt processor
INT_ENABLE INT_RX – enable RX interrupt.
INT_DISABLE INT_RX – disable RX interrupt.
INT_CLEAR INT_RX – clear flags
INT_RETURN ----- To restore and return to the program where interrupt was made.
Note: ResetFlag switch is not required to be YES, FIFO buffer is cleared when read.
<< TX_INT | 14-bit sources | AD_INT >>