| Target Support Package™ TC2 | ![]() |
c281xdspchiplib in Target Support Package TC2 software
Each F2812 Event Manager has three capture units, which can log transitions on its capture unit pins. Event Manager A (EVA) uses capture units 1, 2, and 3. Event Manager B (EVB) uses capture units 4, 5, and 6.
The quadrature encoder pulse (QEP) circuit decodes and counts quadrature encoded input pulses on these capture unit pins. QEP pulses are two sequences of pulses with varying frequency and a fixed phase shift of 90 degrees (or one-quarter of a period). Both edges of the QEP pulses are counted so the frequency of the QEP clock is four times the input sequence frequency.
The QEP, in combination with an optical encoder, is particularly useful for obtaining speed and position information from a rotating machine. Logic in the QEP circuit determines the direction of rotation by which sequence is leading. For module A, if the QEP1 sequence leads, the general-purpose (GP) Timer counts up and if the QEP2 sequence leads, the timer counts down. The pulse count and frequency determine the angular position and speed.

Specify which QEP pins to use:
A — Uses QEP1 and QEP2 pins.
B — Uses QEP3 and QEP4 pins.
Specify how to count the QEP pulses:
Counter — Count the pulses based on the board's GP Timer 2 (or GP Timer 4 for EVB).
RPM — Count the machine's revolutions per minute.
Defines whether to use Clockwise or Counterclockwise as the direction to use as positive rotation. This field appears only if you select RPM above.
Number of QEP pulses per revolution. This field appears only if you select RPM above.
Initial value for the counter. The default is 0.
Time interval, in seconds, between consecutive reads from the QEP pins.
Data type of the QEP pin data. The data is read as 16-bit data and then cast to the selected data type. Valid data types are auto, double, single, int8, uint8, int16, uint16, int32, uint32 or boolean.
![]() | C281x PWM | C281x SCI Receive | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |