Quadrature Encoder-Decoder Is Implemented In A CPLD

Oct. 18, 2004
Quadrature encoders have many uses in position-sensing applications. This implementation uses a Xilinx complex programmable logic device (CPLD) to count the pulses from the encoder and determine the direction indicated by those pulses (...

Quadrature encoders have many uses in position-sensing applications. This implementation uses a Xilinx complex programmable logic device (CPLD) to count the pulses from the encoder and determine the direction indicated by those pulses (see the figure).

The design uses an up/down counter that reads Channel A. The counter is gated by the state of the B input. If B is high on the rising edge of the pulse received at input A, the counter counts up. If B is low, the counter counts down. This produces a 16-bit result that indicates the movement of the encoder shaft. The 16-bit data may be read by any 16-bit microprocessor data bus or port. A1 determines which counter is addressed. A write to either channel resets that channel to zero. The device was programmed in VHDL (available free from Xilinx). The idea may, of course, be implemented on any CPLD or FPGA. The VHDL source listing is available in the online version of this article at www.elecdesign.com.

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!