Pmod ENC Reference Manual
The Digilent Pmod ENC (Revision A) features a rotary shaft encoder with an integral push-button to provide multiple types of outputs. The module also includes a sliding switch that is commonly used as an on/off output. An encoder is commonly used in freely rotating volume knobs to detect how many “clicks” a knob has been rotated.
Download This Reference Manual
- Rotary push-button shaft encoder
- Add multiple types of user input to host board or project
- Additional static slide switch
- 6-pin Pmod port with GPIO interface
The Pmod ENC utilizes a rotary shaft encoder as a way for users to quickly switch between multiple options such as choices shown on a screen or predefined motors speeds. An integral push-button on the shaft as well as a slide switch allows for a highly configurable Pmod.
Interfacing with the Pmod
The Pmod ENC communicates with the host board via the GPIO protocol. It provides four inputs to the system board; the two buttons internal to the encoder that are in quadrature with each other as well as the integral push button on the shaft and the slide switch. A system board will read the integral push button and the slide switch at a logic low voltage in their native (or off in the case of the switch) states.
The two internal buttons are both natively pulled to a logic high level through a pull-up resistor. As the two buttons are located 90 degrees from each other (i.e. in quadrature), while the shaft is rotating one button will be pulled to a low logic level voltage before the other button.
Users can program their system boards to determine which button was pulled low last (within a small time frame to ensure additional “clicks” are not also captured) in order to figure out which direction the shaft is being rotated.
Pinout Description Table
|1||A||Output of button A in the encoder shaft|
|2||B||Output of button B in the encoder shaft|
|3||BTN||Output of the integral push button in the encoder shaft|
|4||SWT||Output of the on board switch|
|5||GND||Power Supply Ground|
|6||VCC||Positive Power Supply (3.3/5V)|
It is recommended that Pmod is operated at 3.3V or 5V, although because there are no integrated circuits on the Pmod, any voltage that your system board can handle as a digital input will work fine.
The pins on the pin header are spaced 100 mil apart. The PCB is 1.5 inches long on the sides parallel to the pins on the pin header and 0.8 inches long on the sides perpendicular to the pin header.