|
Re: Encoders not changing...
i've got one last test to determine if the problem is programming or electrical/mechanical at the root. In interrupt handler low:
Code:
else if (INTCON3bits.INT2IF && INTCON3bits.INT2IE) // encoder 1 interrupt?
{
INTCON3bits.INT2IF = 0; // clear the interrupt flag
#ifdef ENABLE_ENCODER_1
--> puts("1");
Encoder_1_Int_Handler(); // call the left encoder interrupt handler (in encoder.c)
#endif
}
else if (INTCON3bits.INT3IF && INTCON3bits.INT3IE) // encoder 2 interrupt?
{
INTCON3bits.INT3IF = 0; // clear the interrupt flag
#ifdef ENABLE_ENCODER_2
--> puts("2");
Encoder_2_Int_Handler(); // call right encoder interrupt handler (in encoder.c)
#endif
}
The "puts" will output to my screen every time the interupt is called. if it never gets called, then the problem in electrical/mechanical in origin. Does anyone see a problem with my logic? (I'll test it friday at 3:00)
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams
5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)
We have blades on our robot?! ***sweeeeeet***
There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
|