View Single Post
  #28   Spotlight this post!  
Unread 05-02-2007, 10:50
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: SONAR Sensor Software Driver

Quote:
Originally Posted by daveydaycart View Post
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
    }
__________________
"FIRST is like bling bling for the brain." - Woodie Flowers