Single-Chip Quadrature Generator

Feb. 9, 1998
A quadrature generator can be useful in a number of applications, such as motion control and signal processing. The idea presented here describes a very simple and inexpensive implementation of a quadrature generator using a single 8-pin IC, the...

A quadrature generator can be useful in a number of applications, such as motion control and signal processing. The idea presented here describes a very simple and inexpensive implementation of a quadrature generator using a single 8-pin IC, the Microchip PIC12C508 (see the figure).

This also represents one of the first published examples of proven assembler code for the new PIC12C508 microprocessor, and can be used as a basis for other programs (see the listing).

The algorithm for generating the quadrature signal is quite simple. The process is initiated by starting a free-running binary counter (COUNT) and by incrementing this register in an endless loop. Bits 1 and 2 (Bin 1 and Bin 2 in the Timing Diagram) of the 8-bit counter register are then used to directly generate the quadrature outputs.

Bin 2 of the counter is transferred directly to quadrature output Quad 2. Bin 1 and Bin 2 of the counter are then logically exclusive-OR’ed to generate the quadrature output, Quad 1. Quad 1 and Quad 2 are clocked to the output simultaneously to prevent the creation of any output glitches due to intermediate logic states.

The frequency of the quadrature outputs in this program is approximately 10 kHz, using the internal 4-MHz clock of the PIC12. The output frequency can be increased by utilizing bits 0 and 1 of the counter register. Decreasing output frequency involves either operating on the higher bits of the counter register or by adding firmware delays to the program’s counter loop. A sinusoidal output can be generated by adding a low-pass filter to each of the output signals.

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!