This is in the encoder.c file:
Five things must be done before this software will work
* correctly on the FRC-RC:
*
* 1) The left encoder's phase-A output is wired to digital input
* one and the phase-B output is wired to digital I/O six.
*
* 2) The right encoder's phase-A output is wired to digital input
* two and the phase-B output is wired to digital I/O 8.
*
* 3) Digital I/O pins one, two, six and eight are configured as
* inputs in user_routines.c/User_Initialization(). If you notice
* that the encoder only counts in one direction, you forgot to
* do this step.
*
* 4) A #include statement for the encoder.h header file must be
* included at the beginning of each source file that calls the
* functions in this source file. The statement should look like
* this: #include "encoder.h".
*
* 5) Initialize_Encoders() must be called from user_routines.c/
* User_Initialization().
*
has it been changed?
Jon
Quote:
|
Originally Posted by jgannon
It doesn't. It uses 1 and 7 for one, and 2 and 8 for the other. 1-6 can be hardware interrupts, and 7-16 cannot. This means that you're pretty much limited to six digital encoders.
|