First Steps with Programmable Logic

Let's say you need a five bit binary counter and do not happen to have one in store. What would you do? I did have a few Atmel/Microchip GALs which I never had a chance to put to good use up until now. The WinCUPL syntax for specifying a design is a bit odd and it takes some time to get used to when you are coming from a software background. But it can be done, perstistence beeing, as often, the mother of all virtues. I spent quite some time figuring out what the proper equations should be but I eventually found out.

The ATF22V10C has registered outputs, which means they can be used for counting purposes or as shift registers. The magic incantations happen to be as follows:

q4.d = q4 $ (q3 & q2 & q1 & q0);
q3.d = q3 $ (q2 & q1 & q0);
q2.d = q2 $ (q1 & q0);
q1.d = q1 $ q0;
q0.d = !q0;

The beauty of the design is simply outstanding!

Comments

Popular posts from this blog

We Have a PCB Now!