Quote:
Originally Posted by daveydaycart
I got my default code from kevin.org, it is his camera code version 2.1.
|
In the file user_routines_fast.c you have to change the function InterruptHandlerLow(). Add the following code to the IF statement.
Code:
else if (PIR2bits.TMR3IF && PIE2bits.TMR3IE) // timer 3 interrupt?
{
PIR2bits.TMR3IF = 0;
Timer_Interrupt_Sonar(); // Call SONAR Timer Interrupt Handler
}
else if (INTCON3bits.INT2IF && INTCON3bits.INT2IE) // external interrupt 1?
{
INTCON3bits.INT2IF = 0;
Hardware_Interrupt_Sonar(); // Call SONAR hardware interrupt handler
}