TMR0INT

TMR0_INT -- TMR0 Overflow Interrupt 16f

Uses TMR0_INT INTCON,T0IF, T0IE Registers and Control Bits.
Uses TMR0_INT INTCON,TMR0IF, TMR0IE -- TMR0 alternate sym

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,( _TimeOut). 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 TMR0_INT

ASM

 INT_LIST     macro     ;IntSource      Label,    Type,    ResetFlag?
            INT_Handler   TMRO_INT     _TimeOut   PBP       Yes
            endm
            INT_CREAT              ; Creates the interrupt processor
            INT_ENABLE    TMR0_INT  ;enables TMR0 interrupts

ENDASM

Command functions:
INT_CREATE ;Creates the interrupt processor
INT_ENABLE TMR0_INT to enable TMR0 interrupt
INT_DISABLE TMR0_INT disable TMR0 interrupt.
INT_CLEAR TMR0_INT -- clear flags
INT_RETURN ------------- To restore and return to the program where interrupt was made.



Example by Charles Linquis

Consideration for PIC16f88

<< IOC_INT | 14-bit sources | TMR1_INT >>

Page last modified on March 25, 2018, at 12:07 AM