Corrected interrupts for pic18f6720 demo.

This commit is contained in:
skarg
2007-02-02 19:10:47 +00:00
parent ba7a1ad750
commit e89637f1f9
4 changed files with 132 additions and 43 deletions
+13 -9
View File
@@ -29,7 +29,6 @@
#include "dlmstp.h"
/* from main.c */
extern volatile uint8_t System_Seconds;
extern volatile uint8_t Milliseconds;
void InterruptHandlerHigh(void);
@@ -42,17 +41,23 @@ void Interrupt_USART_Tx(void);
void Interrupt_CCP2(void);
void INT0_Interrupt(void);
#pragma code InterruptVectorHigh = 0x308
#pragma code InterruptVectorHigh = 0x08
void InterruptVectorHigh(void)
{
_asm goto InterruptHandlerHigh /* jump to interrupt routine */
_endasm}
/* jump to interrupt routine */
_asm goto InterruptHandlerHigh
_endasm
}
#pragma code
#pragma code InterruptVectorLow = 0x318
#pragma code InterruptVectorLow = 0x18
void InterruptVectorLow(void)
{
_asm goto InterruptHandlerLow /* jump to interrupt routine */
_endasm}
{
/* jump to interrupt routine */
_asm goto InterruptHandlerLow
_endasm
}
#pragma code
#pragma interrupt InterruptHandlerHigh
void InterruptHandlerHigh(void)
@@ -79,7 +84,6 @@ void InterruptHandlerHigh(void)
/* check for timer0 int */
if ((INTCONbits.TMR0IF) && (INTCONbits.TMR0IE)) {
INTCONbits.TMR0IF = 0;
System_Seconds++;
}
}