|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Encoder Help with VEX and MPLAB
Greetings,
I am trying to set up some reference encoder for my team. We are using MPLAB with Vex Controller. Is there a way that I can get the interrupt to be triggered on the raising or falling edge of the resulting encoder square wave? Right now my code (below) just looks to see if the signal is high (0) or low (1), but if the encoder happens to stop when the signal is high , the encoder count just runs. Code:
if(rc_dig_int1)
{
encoder1++;
PORTBbits.RB2=0; //Set Interrupt = 0
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with MPLAB | burningpig | Programming | 9 | 17-01-2007 13:10 |
| Kevin Watson and programming VEX in MPLAB | Doug Leppard | Programming | 4 | 24-08-2006 21:05 |
| Vex Programming with MPLAB and IF loader | Joohoo | Programming | 3 | 27-07-2006 18:18 |
| VEX UltraSonic and Encoder SOLD OUT... | Chris_Elston | Electrical | 5 | 09-01-2006 13:22 |
| Need Help with Encoder - Won't Count Clicks | Kingofl337 | Programming | 5 | 16-02-2005 18:30 |