Quantcast
Channel: Microcontrollers, Programming and IoT
Viewing all articles
Browse latest Browse all 1271

Two functions in the high priority interrupt.

$
0
0
i guys, I'm using the PIC18F46k22 mcu and I'm using two function in my high priority interrupt routine:

#pragma code
#pragma code My_HiPrio_Int=0x0008
#pragma code
#pragma interrupt chk_isr

#pragma code
void My_HiPrio_Int(void)
{
_asm
GOTO chk_isr
_endasm
}

void chk_isr(void) /*Serial Interrupt*/
{
INTCONbits.GIE = 0;

if(INTCONbits.TMR0IF==1) //Timer routine
Timer0_ISR();

if(PIR1bits.RC1IF) //RS485 receiver
RC_ISR();

INTCONbits.GIE = 1;


}


void Timer0_ISR(void)
{
nTick0++;

if(pSet ==...

Two functions in the high priority interrupt.

Viewing all articles
Browse latest Browse all 1271

Trending Articles