BUS1INT

BUS1_INT -- Bus Collision 1

Uses PIR2,BCL1IF, PIE2,BCL1IE Registers and Control Bits.
DT's Interrupts MUST be used with PicBasic Pro and MPASM.

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 BUS1_INT

ASM

 INT_LIST     macro     ;IntSource      Label,    Type,    ResetFlag?
            INT_Handler  BUS1_INT     _GetData   PBP       Yes
            endm
            INT_CREAT              ;Creates the interrupt processor
            INT_ENABLE    BUS1_INT  ;enables BUS1 interrupts

ENDASM

INT_ENABLE BUS1_INT enable BUS1 interrupt.
INT_DISABLE BUS1_INT disable BUS1 interrupt.
INT_CLEAR BUS1_INT clear flags
INT_RETURN ---------- To restore and return to the program where interrupt was made.

<< BUS_INT | 14-bit sources | BUS2_INT >>

Page last modified on March 16, 2018, at 11:11 PM