T1GATE_INT -- Timer1 Gate
Uses PIR1, TMR1GIF, PIE1,TMR1GIE 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 T1GATE_INT
ASM
INT_LIST macro ;IntSource Label, Type, ResetFlag? INT_Handler T1GATE_INT _GetData PBP Yes endm INT_CREAT ;Creates the interrupt processor INT_ENABLE T1GATE_INT ;enables T1GATE interrupts
ENDASM
Command functions:
INT_CREATE ;Creates the interrupt processor
INT_ENABLE T1GATE_INT – enable T1GATE interrupt.
INT_DISABLE T1GATE_INT– disable T1GATE interrupt.
INT_CLEAR T1GATE_INT– clear flags
INT_RETURN ---------- To restore and return to the program where interrupt was made.
12F1822 Example by richard
T1GATE_INT Example....Post
16F722A Example by richard
T1GATE_INT Example....Post
<< OSCF_INT | 14-bit sources | CRYPT_INT >>