In the previous entry, we designed a 1 bit counter using a T flip-flop. If the clock signal goes on and off (while T = 1) continuously, you will observe the following:
Try this out yourself on Wokwi, "T flip-flop". In order to see this more clearly, I want to create an "automatic" clock signal, relieving me from the work of clicking the button. Let's do this before we create a 4 bit counter.
Automatic clock signal
"How do you create an automatic clock signal?"
Creating an automatic clock signal for your 4-bit synchronous program counter (or any digital circuit) is a great way to move from manual button presses to continuous operation, mimicking a real CPU’s clock. An automatic clock generates a steady stream of pulses (square waves) at a predictable frequency, toggling between 0 and 1 to drive your system. The simplest and most popular method is using a 555 timer IC in astable mode, which produces a continuous oscillating signal without external triggering. Since you’ve been working with TTL (74LS series) components, we’ll design it to output a 5V-compatible square wave at a frequency suitable for manual observation or faster testing. Let’s walk through it step-by-step.
Why an Automatic Clock?
- Manual CLK (Button): Your current CPU signal relies on button presses—slow and irregular (~1 Hz if you’re fast).
- Automatic CLK: A 555 timer provides a consistent, adjustable frequency (e.g., 1 Hz to 10 kHz), letting your counter increment automatically and your system run like a real processor.
The 555 Timer in Astable Mode
- Function: In astable mode, the 555 timer oscillates continuously, producing a square wave at its output (Pin 3).
- Key Features:
- Frequency and duty cycle set by resistors and a capacitor.
- TTL-compatible output (0V to ~5V with proper setup).
-end-
The 555 is a fairly simple chip, but it cannot be designed from basic gates. It contains an SR latch that holds the state (0 or 1), and some additional transistors and resistors. Just like the basic gates and the tri-state switch, I will not dig into the "transistor-details". In addition to the 555 chip, you also need a few resistors and capacitors. This is what I use:
Here it is hooked up to an LED:
Clock signal to T flip-flop
I am hooking up the clock signal from my 555 board to a T flip-flop:
The purple box represents the clock signal. Here is the result:
Observe how the frequency of the output is precisely half the frequency of the clock signal, just like in the picture at the top. You can try this out yourself at Wokwi, project "Clock to T flip-flop". On to the 4-bit program counter, in the next entry.
No comments:
Post a Comment