Clock Module- The Final Chapter: Bistable Timer

Pranav
kgxperience
Published in
10 min readFeb 16, 2024

Had taking chances been everyone’s cup of tea, the word “UNSUCCESSFUL” would never have made it into print in the dictionary. On my perspective of view, I could define the term ‘Risk’ as an “intentional interaction with some uncertainty”
As I stated about taking risks, I’m reminded of our renowned Swami Vivekananda’s saying,

Take risks in your life: If you win, you can lead!
If you lose, you can guide!!

Life is all about taking risk, making some crazy decision which will either take you to the top or keep you at the same spot or take you back down from scratch. It is actually easier and more comfortable to sit down in the safe spot and wait. But, stepping out of the comfort zone and taking things head-on is what distinguishes the doers from the dreamers.

Well, all my tech aficionados are a great doers ✨because you all have been led by an experimenting person who do stuffs with you rather than just cooking up stories. That was quite too much to start with, isn’t it😅??

Anyway, once again I welcome back all my tech buddies here as we are on the verge of completion of our Clock Module. Hurray!🎉.The last part of a Clock Module is the ‘Bistable Part’ and obviously that is what we are going to build today.
So gears up🚀! Get ready to dirt your hands with some resistors and capacitors⚡💡.

In our last two blogs we built an Astable and a Monostable circuit using a 555-timer. Now we will be requiring a timer which could switch between these two states. As soon as I mentioned, you all might have got the idea of using a ‘Switch’ to make this happen. Absolutely YES!. Using a Switch we can make this happen.

But what kind of switch are we going to use🤔🤔🤔???
We will be using a “Double-pole toggle switch”. So,obviously after telling what to use, you all will be eager to know ‘Why’ to use.

Double Pole Toggle Switch 1

A Double Pole Toggle Switch is a switch which could toggle between two circuits. Since we have built 2 circuits and as we need a circuit which could toggle between these, obviously Double Pole Toggle Switch is the appropriate and only choice.

Double Pole Toggle Switch 2

The above mentioned image is also a Double Pole Toggle Switch. To build our circuit we will be using the above mentioned switch(Double Pole Toggle Switch 2). Nothing particular, since the previous switch does not suit the breadboard, we are moving with this one. Before we start, the components we require to build this circuit are,

Circuit from parts 1 and 2
1x 555 timer IC
2x 1kΩ resistors
1x 330Ω resistor
1x 0.01µF capacitor
1x Double-pole toggle switch
1x LED & 22 gauge wire

The protagonist of this story is going to be our SR Flip-Flop. But where do we go for an SR Flip-Flop?? Are we gonna build a SR Flip-Flop🤯???

Take a chill pill!! There is no necessity to build an SR Flip-Flop as it is readily available in our 555 timer. The unsung silent hero in our timer is going to be an action star in this story.

Bistable Timer Circuit Diagram

Our circuit diagram looks almost same to that of an Astable Timer, added that we will be using our 4th pin(i.e the reset pin) of our 555 Timer, which is an inverted one.

4th Pin Highlighted

For time being let’s forget all our other pins and just focus on our reset pin.
And asusual the 5V is divided as 3.33V and 1.67V at the voltage divider junction respectively.Now, the same procedure, when the voltage is below 1.6V, the ‘Set’ part of the SR Flip-Flop turns ON and if it exceeds, the ‘Threshold’ pin gets activated and our ‘Reset’ part of our SR Flip-Flop turns ON.
But that is the catch. Here we are not going to use our Threshold part. Rather we will be grounding it. The reason we are doing it is because we will be activating our ‘Reset’ pin(i.e the 4th pin) which acts as an inverted one. This ‘Reset’ pin is somehow a short cut to the ‘Reset’ part of our SR Flip-Flop.

Now let’s connect one end of our Double Pole Toggle Switch to the 2nd pin(Trigger Pin) and other end to the 4th pin(Reset Pin). The middle part of the switch is grounded.

Bistable Connection

As we can see in the image, we have given all the connections accordingly.
Now, if we push the button we can see the light glow until the button is pulled back.

Finally, we have built all our timers, Astable, Monostable and Bistable.
Now we all need is a logic to combine all these timers together. How can it be achieved🤓? Come let’s explore✨

Rather than confusing you all with the circuitry, let me show you a simple diagram with just AND and OR gates on how the timers are going to work together according to our logic.

Combinational Clock Logic

From the image we can see all our 3 states, Astable pulse, Select pulse(Bistable) and our Manual Pulse. Now our aim is to make sure to provide a single clock pulse, from the combination we gonna make.

For that, we have built a simple logic in the above diagram. Now let’s check how is this going to be effective.

As we can see in the diagram that, our 'Select' pulse is common between both 'Astable' and 'Manual' pulse.

One part of the 'Select' pulse and the 'Astable’ pulse is connected to an 'AND' gate. And other part of the 'Select’ pulse with an inverter is connecting another 'AND' gate with our 'Manual' pulse. From the outputs of the 2 'AND' gate it enters the 'OR' gate.

Initially let’s consider our 'Select' pulse is on, 'ON' state and our other 2 pulse is also on 'ON' state. Now, the 'Astable' and 'Select' pulse have same value which satisfies the condition of 'AND' gate. Whereas on the other hand, the 'Manual' pulse will be 'ON' but the 'Select' pulse will turn into 0 as it is crossing the inverter. So obviously the resultant of the 'AND’ gate for Manual and Select pulse will become 0.

Similarly if we consider the 'Select' pulse to be 0, and other 2 pulses are 'ON' state, then, the 'Astable' part will fail the condition of the 'AND’gate and results 0. But the 'Manual' part will result positively.

You got confused!!? Nothing it’s absolutely simple. What I have tried to explain is that, when one pulse is being executed, other pulse will be at 'OFF' state. Which is our required logic. With the help of these gates we will be building such a logic which results in a single clock signal.

But, do you guys think that the logic is 'COMPLETELY' over?? Have we fixed everything that our logic seems to be perfect? However it’s not. We will be requiring a line called 'Halt line’.

Halt line (Highlighted part)

But the use of this 'Halt line' will be requiring only after the completion of our computer, where we will be having a need to halt the computer programatically. Once after the program is executed and after the execution is done, there is no more output needed to display. So it wants to halt the execution of the computer.

We will be receiving this signal from the control module which enters the clock and turns it 'OFF’. As I have always mentioned 'Clock is the heart of computer' , if it stops to beep, then consider the Computer is inactive.

Normally the halt line will be 0, and oncevit crosses the inverter it becomes 1 and it is then added to the 'AND’ gate which is connected from the outputs of 'OR' gate and this 'Halt line’.

Now if the 'Halt line' goes 'High' absolutely the resultant of 'AND' gate will become 0 referring the 'OFF' state of the computer. So this is our Final connection of our logic.

Diagramatically we have proved our logic is worth it to produce a single clock pulse, now let’s try converting it as circuits. Before that, here we have got a couple of invertors, 3 'AND’ gate and an 'OR' gate.

Let’s take an IC which has an inverter and the Gates required. First, let’s consider using a LS7404 IC which has 6 inverters where we will be using just 2. Similarly we also have got IC 74LS08, which have 4 'AND’ gates where we will be using 3. And also we will be using 74LS32 which have 4 'OR' gate but we will be using only 1.

So now you all may come up with a question that is there any other way to build this Logic?, Well yes. But we find this could be a simple yet efficient way of handling the circuit. Let me keep this as an open idea to you all. If anyone could think an another way of building this logic, using other Gates or however, according to your genius mind. Let’s see how many tech wizards are uprising this time 😉.

Well, it’s circuit time. We have our 74LS04, 74LS08 and 74LS32 below the Double toggle switch, respectively. In our 74LS04 IC the power pin is the 14th pin and the ground pin is the 7th pin. Below you can see the zoomed view of the 74LS04 IC.

Internal view of 7404 IC

It’s the same for both 7408 and 7432 (Only the power and ground)

You all might be wondering, how come this guy is knowing all the internal connection of every IC. Relax guys, I use datasheets for my reference. For whatever IC that I use, I’ll refer to the datasheets to know the internal circuitry. I also have provided the link for the datasheets below at the end of our blog. For time being let’s understand the connection.

Let’s assume we have pressed the 'Select' pulse and the output of that pulse is given to the inverter(i.e the 1st pin) of the 74LS04 IC which is jumpered over here to input of one of our 'AND’ gate (i.e is the 1st pin of 7408IC).

Now, the output of our Astable pulse(3rd pin) is given to the 'AND' gate(1st pin of 74LS08 IC).

Connection of Astable pulse to AND Gate

After this, our another input, which is the inverter input connecting from 7404 IC(2nd pin) to 7408 IC(4th pin). Whatever we have seen in the diagramatic view we are applying it on the breadboard.

Connecting the 7404IC and 7408IC

And our another input comes from the output of our 'Manual' pulse (i.e the 3rd pin), towards the 74LS08 IC(5th pin)

Connecting Manula pulse to 7408IC

Since we have to connect multiple wires, it got overlapped and looking quite clustery. Anyway, now both our 'AND’ gates are connected to our 'OR' gate(i e 74LS32 IC) according to the diagramatic logic.

Final connection, the 3rd pin of our 74LS32 IC is been connected to the 10th pin of our 74LS08 IC, which is the 'OR' connection which travels as an input towards one of the 'AND’ gate. Anither input towards the 'AND' gate would be from the 74LS04 IC(the inverter, halt line). Initially the halt line is grounded. Below is the representation of the completed connection. Kindly refer the datasheets for the internal circuitry connections. (Link for the datasheets have been provided below.)

Final Clock Circuit

We have placed a Red LED to display the final pulse. This will show whether our design was right practically or not. Let’s try it 😉

Working of Clock Module

Hurray! 🥳🥳🥳 Guys! We made it.

Our LED is working! Not just working, but also following our logic. That’s absolutely amazing. Isn’t it!

Now many might raise a question here, that we have got our single required clock pulse. So still do we need to have LED’s at the Astable, Monostable and Bistable part?? The marked one in the image.

Optional LED’s

Well actually not. It’s not necessary to have those LED as we have gained our clock pulse. But in future there may be a chance of facing some issues in the pulse so if you have to troubleshoot it you might definitely need the help of the LEDs to figure out 'Where' and 'What' went wrong.

Guys! We really made it. Our tick-tocking clock is ready!!!

Time to have a party 🥳🎉😂

Successfully we have reached a Milestone on completion of our 1st Module in our 8-Bit Computer 🎉.

More to go. Join and stay updated with me in this journey. Let’s travel together and dwell ourselves in the ocean of learning with craziness 😉💪🏻.

Guys do suggest me what kind of blog shall we publish in our next release. Shall we start to build our next module or a blog of building Latches and Flipflops?

Do provide your valuable suggestions which has been my all time motivation to move forward. Hoping your esteemed support.

As I always say,
Your Support! Our Adventure❤️!!

Be crazy, build cool stuffs. Meet you all soon with a new episode. Until then it’s a bye👋🏻

Datasheet link: 74LS04 , 74LS08 , 74LS32

Connect me through:

GitHub:-> https://github.com/PranavRajeswari

LinkedIn:-> https://www.linkedin.com/in/pranav-rajesh-9b694a241/

Gmail: pranav.mukundh@gmail.com

Circuit Diagram and Connection Credit: Abinaya Meenatchisundharam

--

--