ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

LOGIC DESIGN REVISTED


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

LOGIC DESIGN REVISTED

Lessons from the Trenches

by George Martin

Start ı A Merger ı Make the Design Synchronous ı Toplevel ı Quadlogic ı Counters ı Catch That? ı Sources and PDF

A MERGER

Iıd like to go a bit further this month with logic design. Specifically, logic design for the more complicated field programmable devices. I wrote about Lattice Semiconductorıs new design tools two months ago. And, a long time ago, I wrote about A quad B converters using PALs for an Ask Us question. This month, letıs put the two together.

A quadrature encoder converts rotary motion to output two signals named A and B. And of course, these two signals can have four values or states. Depending on the direction of the rotation, clockwise (CW) or counter-clockwise (CCW), the states are slanted in one direction or the other (see Table 1).

A leads B
CW Rotation

B leads A
CCW Rotation

A
0
1
1
0
0
B
0
0

1
1
0
A
0
0
1
1
0
B
0
1

1
0
0
Table 1ıThe direction of the rotation will determine which direction the states are slanted.

Typically, A leading B is denoted as counting up and B leading A as counting down. Given a perfect world, the state changes are all uniform.

Letıs design our system for 10-MHz states. That means, at the minimum speed, that each state is nominally 100 ns in duration. So, you could be counting up (or down) at one count every 100 ns. If youıre building a long counter to accumulate the position, then that counter needs to count at the 100-ns rate. By that, I mean that a count has to ripple through all the bits of the counter by the time the next count arrives. And, reading the counter should be done synchronously (more on this a bit later).

In the real world, the encoder is going to stop on an edge, either A or B. So, what could be seen on the inputs is one steady, the other oscillating, and some high frequency. Typically an IC driving the cable is the load, which will set the rate of the oscillations. It would be nice if the hardware had hysteresis to prevent the oscillations, but you had better be able to handle it in the logic.

PREVIOUS NEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ıCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ