|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Encoder Problemo
The encoders need to be plugged into digital inputs 1 through 6. Those digital inputs are interrupt pins, and without interrupts, kevin's code doesn't work.
|
|
#2
|
||||
|
||||
|
Re: Encoder Problemo
Ithink that we are wired correctly
Do we have to call any function besides Encoder Initialization oroutside the readme? |
|
#3
|
|||||
|
|||||
|
Re: Encoder Problemo
Wouldn't you rather be certain that the wiring is correct? If you tell us exactly how it's connected, we can tell you if there's something you misunderstood about the wiring and need to change to make it work.
|
|
#4
|
||||
|
||||
|
Re: Encoder Problemo
Here is a quick program I wipped up in easyC you can use to test your encoders.
Encoder 1 - Plug into I/O Port 1 (Channel A) Plug into I/O Port 7 (Channel B) Encoder 2 - Plug into I/O Port 2 (Channel A) Plug into I/O Port 8 (Channel B) Source: Code:
void OperatorControl ( void )
{
StartQuadEncoder ( 1 , 7 , 0 ) ;
StartQuadEncoder ( 2 , 8 , 1 ) ;
while ( 1 )
{
PrintToScreen ( "Encoder 1: %5ld Encoder 2: %5ld\n" , (long)GetQuadEncoder ( 1 , 7 ), (long)GetQuadEncoder ( 2 , 8 ) ) ;
}
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Encoder Problems | bjimster1 | Programming | 2 | 10-02-2007 08:04 |
| Encoder Error | Anime-niac_2.9 | Programming | 1 | 27-01-2007 16:23 |
| Encoder Problem | DustinB_3 | Programming | 22 | 03-01-2007 20:42 |
| Encoder help | Windward | Programming | 21 | 14-01-2006 15:10 |
| encoder.c | Gary Bonner | Programming | 2 | 14-01-2005 13:41 |