|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#11
|
|||
|
|||
|
Re: Gear Tooth Sensor
Our code looks something like this for Encoder 1 and 2
void Encoder_1_Int_Handler(void) { // Encoder 1's phase a signal just transitioned from zero to one, causing // this interrupt service routine to be called. We know that the encoder // just rotated one count or "tick" so now check the logical state of the // phase b signal to determine which way the the encoder shaft rotated. if(ENCODER_1_PHASE_B_PIN == 0) { Encoder_1_Count += ENCODER_1_TICK_DELTA; } } #endif #ifdef ENABLE_ENCODER_2 Would this work or not? P.S. If I take away the #ifdef ENABLE_ENCODER_3 from the correct intrrupt would that correctly disable ENCODERS 3 -6. If not was would be the correct way for doing this. Last edited by Ultima : 16-01-2007 at 15:34. Reason: Clarification |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gear Tooth Sensor | nukem | Programming | 9 | 04-02-2006 20:21 |
| Gear Tooth Sensor | Talha | Electrical | 1 | 23-01-2006 21:29 |
| Gear Tooth Sensor | AMIRAM | Electrical | 2 | 22-01-2006 04:09 |
| Gear Tooth Sensor Question | (InsrtNameHere) | Electrical | 2 | 20-01-2006 02:19 |
| Gear tooth sensor issues | Nine9cracker | Electrical | 2 | 17-01-2006 02:37 |