Clock logic - 8-bit computer clock - part 4
Вставка
- Опубліковано 29 сер 2024
- Our computer's clock is built using several 555 timers. This video covers the logic that ties them together, resulting in the completed clock module. See eater.net/bbcp... for more.
Part 1: • Astable 555 timer - 8-...
Part 2: • Monostable 555 timer -...
Part 3: • Bistable 555 - 8-bit c...
Support me on Patreon: / beneater
You can get all the components used in this video from any online electronic components distributor for a few dollars.
Complete parts list (everything in this video):
- Circuit from parts 1, 2, and 3
- 1x 74LS04 (Hex inverter)
- 1x 74LS08 (Quad AND gate)
- 1x 74LS32 (Quad OR gate)
- 1x LED
- 22 gauge wire
I'm so amazed by the quality of your video especially because of the fact that you have so few subscribers. If I didn't see your subscriber count I'd assume you have a couple hundred thousand or more based on how clean the quality control is of your videos. the great camera, great instructions, prepared diagrams etc. are really all top notch. Keep doing what you're doing cause it's fantastic.
Only now does he have 138 thousand subscribers really
Retrospective irony
@7-Minute Crafts Wow quite a bit for only one year! Nice
@7-Minute Crafts 380K. 'Good' travels fast :)
@Cfire10 Tech 518,000 as of 5/18/2020
You could use the 556 to make more room. It contains dual 555 timer in single package.
yes you could, but I don't think that would be as instructional. It wouldn't show the same chip in 3 different configurations. 'Upgrading' this to use a single 556 is left 'as an exercise for the reader'.
I thought you were joking but it really is a thing...
@@Amethyst_js the 556 is one of my favorite ICs because it's name is even funnier than the 555
It should be called the 1110
Yes!
Struggled with this for a couple of hours trying to find out why the AND gate didn't appear to work when Astable clock was enabled but manual clock also worked on the output..... Dead track on the breadboard was the culprit so the inverter was not outputting. This is a great series with excellent instruction and explanation.
Finished my clock module. Was a lot of fun. Looking forward to building my eeprom programmer and getting started on the 6502 machine. I started with the schematics and resorted to your video if I needed help. Oof, my electric engineering class was a long time ago. But it did start coming back to me. Fun way to spend an afternoon.
back when the old computers used to fill a large warehouse, they used hundreds of nand gate cards.
Then they wired the sockets together to make other functions.
that way they could mass produce the same circuit cards over and over.
This series is excellent. I really appreciate you breaking our the "How" an the "Why" of the sub-circuits, not just showing us what components to use and how to wire them. I was not expecting to see a breakout description of how the 555 timer is accomplishing the needs of the clock circuit. It is fascinating. Also, thank you for going the extra mile and using the 555 timer in three different modes to teach us more of its capabilities.
I'm really really (really) looking forward to the next videos on this topic. Ordered a bunch of IC's on ebay just to follow along :D
It's usually good practice to tie the unused inputs on your logic gates high or low so that they do not oscillate and interfere with there neighboring gates. Great videos by the way keep up the good work.
Jake Wilkes True for CMOS, but most of his chips use logic families with internal pull up resistors. Compare the input currents for high and low levels.
You are right he should have done that. (or at least talked about it). 74ls don't require that, but someone reproducing that design with another technology might have issues, especially with badly decoupled power pins.
i checked on my scope with the unused inputs floating and i had 0.5V of ringing in my signal. i tied all the unused inputs to ground and my square pulses are clean again. the 74LS04 inverter was especially bad.
Such an awesome channel, I’ve watched a lot of these multiple times and every time I learn something new and get more fascinated. I’ve decided to try to build some of this stuff myself
The use of his scope in the first couple videos for the clock module is a great real world example. I try to find scope videos and almost all of them just go over the features, but no real world use.
More interesting than the digital systems lecture on university 💪🎓
This man has taught me more than professional teachers
hey if you put the halt line before the manual pulse and have the manual pulse pulse the clock anyway (basically switch them) then you can program a HLT instruction into your program later on as a debug breakpoint. and use the opporunity to switch to manual mode and step through the next few instructions.
That gave me the idea, how to replace the 3rd NE555, 74LS04 and 74LS32 with just a single 74LS02 (nor gate), by building a manual sr-latch and using a nor-gate in series to get an or-gate
@@TinusBruins Actually Ben said that circuit shown on video isn't optimized good, it's just done for quick demonstration so you can improve it as you want.
@@the_angler_2 I'm well aware Ben said that. It doesn't mean, that it's not ugly to use a Ferrari to transport garden tools when a pickup truck would suffice. So if someone gives me an idea how I can achieve that, I'd like to compliment them.
@@TinusBruins Actually this is education purpose computer, there's so many things to optimize. You can throw out LED's, bus transceivers etc. But the clock module was constructed from AND, OR gates etc for simple understanding. Actually all computer can be assembled using NAND only gates or PLD. But it was build that way. There's not so many attention paid to clock module.
@@the_angler_2 You repeat what Ben said in it's video. And offcourse he uses AND, OR gates for simplicity that didn't even bother me. It's even posible to construct an sr-latch out of the spare gates, using an OR-gate in conjunction with a NOT-gate. Which actually gives educational value to how a NOR-gate functions as bonus. But at the time of my comment, I didnt knew you could build that from the spare gates. As then I only knew how to make an sr-latch with NOR-gates on paper.
Still amazing after more then half a decade from when you first made these videos. They are truly timeless. I am so happy I found your channel!! I just purchased the first module and built the clock and found it so fun and easy to follow. Your kits are great and I plan on getting them all and building them all. I have learned so much from your videos and just wanted to say thanks so much for all the hard work and time you have put into making these high quality content videos. You rock my friend!
I was able to implement the clock logic circuit using a single 74LS157 (2:1 Line Multiplexer) chip, used in later parts of the CPU. Basically, you can use the select button signal to select from manual or auto mode. The HLT signal can be tied to the Strobe input on the 74LS157, which acts like an Enable input for this chip.
I'm done building the clock module and I'm enjoying everything thus far. I bought your whole set and I love going through it and learning everything I kinda wish I had learned more of in university. Appreciate the effort that went into these videos.
Please Ben keep going on with your videos
All the videos you have been uploading are so helpful. Clear step by step explanation in addition to your calm voice makes everyone understand without any difficulty. I really appreciate your work.
Also you can REMOVE the OR GATE chip completely and JUST use the Quad AND chip and the Hex Inverter chip (using 5 of it's 6 gates) --- replace the OR GATE with a single AND GATE, but INVERT BOTH INPUTS & THE OUTPUT --- This converts the 'AND gate' to a NOR, and inverting the output makes the NOR an OR. (so replace the OR with AND, invert both inputs and the output, rest of circuit as shown in the video! 😊😊 Only two chips, and use ALL but one of the available logic gates 😊
Or use all NAND lol
why are you writing some words with caps lock and others not?
@@TantalumPolytopeemphasis
Just finished the clock. Thank you, Ben. Onward toward the 6502...
At this point several people are asking why you even need the OR gate, can't you just tie the outputs of two AND gates together? This may work for relay logic and some other purposes but in TTL logic there are transistors that connect the output of the gate to 5v for a 1 and to ground for a 0. If the two gates are in opposite states you have created a short - 5v to ground. You could potentially use a diode on each output like in diode-transistor logic to create an OR gate but this may still cause problems with leakage currents, bias voltages etc. It is easier to just use an TTL OR gate. Besides they are cheap.
Thank you for anwering the question
I have found a super simple or gate that solves this issue entirely. Just 2 diodes, nothing else. The inputs go through the two diodes, then the outputs of the diodes are tied together. Extremely simple OR gate that works even with TTL logic! Came up with the concept (Believe it or not) while playing with some redstone in Minecraft of all things.
In 1 ---------->--\
|------- Out
In 2 ---------->--/
@@andreyrumming6842 Minecraft's redstone is a grossly underrated educational tool. Well done!
@@andreyrumming6842 If you read the parent comment they already mention this. Still a cool find tho, redstone circuits are very fun for this kind of stuff
@@IronLotus15 Wow, I must be completely blind, thanks for pointing that one out!
It has taken me less than 1 complete video to decide and buy the required parts to follow along :-) Great channel. I will use the builds to introduce my son to digital electronics. I'm 50+ and took analogue electronics back at school before a bachelor in digital communications & broadcast engineering. Feels good to jump back on the 6502!
You forgot the current limiting resistor for your blue led in the video (which is why it’s twice as bright as the other leds) but I see you did have it defined in the kit diagram. :) Amazing videos and love putting together my own version.
I actually was looking for this comment, I thought so too, but wasn't confident enough to say if I was missing something like a resister somewhere else on the line. Glad to know I was right (means I'm learning), and that it is on the kit diagram.
Yup, was looking for the same thing - the missing 220 Ohm resistor for blue LED.
This series is by far the best in explaining the functionality of a-stable and mono-stable 555 timer circuits!
Thanks for sharing and keep up your great work!
I don't know how I ended up here, but this is pure gold. I hope this lecture help me through understanding computer hardware which seems like a mystery box.
The best series on the 555 timer and some logic manipulation on top of that.
This series of videos is a piece of work!! All is clearly explained, using documentation and drawings, step by step. Congratulations!
I am amazed that I understand how this clock module works. So many ICs and yet they all make sense.
To look at it in another way, had I seen this video as a starting point, I would have been completely lost.
However, having followed your videos in the given sequence, everything makes sense. These black chips are not intimidating anymore.
Thank you again Ben. Wonderful work.
Thanks again 4 part 4.....
I like 555s. I LOVE Relays.....
I just built this module! I'm having a blast. Thanks for doing this Ben. I've been using Multisim to do this for a few years and always wanted to do an actual hardware simple computer and you showed me how to do it. :-) Today I got the chips to do the a & b registers and the ALU, so that's my next step. Should be busy for a few days. THANK YOU!
My approach for the implementation of the clock logic without going to programmable logic would be to use 1/4 of a 74LS157 quad 2-input mux. You could use the enable input as your HALT one. It uses only one chip.
This is basically writing "code" but done in pure hardware. Very nicely done.
Just got this set in my mailbox, it’s unarguably the nicest gift for myself in years. Wow. Thx Ben!
Fantastic description of a 555 circuit! Totally enjoying this playlist!
You've inspired me to make my own 8bit computer, I have experimented with making basic logic gates out of resistors and then made a 4 bit calculator. This is my next project for today, thank you so much for everything you've done!
Resistors or transistors?
Loving this series. Really well explained & well laid out circuit on the breadboard makes understanding your ideas easy to follow along with so well done. Can't wait to see more :-)
I found you videos randomly and ever since i clicked on it i fell in love with this kind of stuff. last semester i took an assembly/digital logic course at college and the class pulled me into wanting to know even more and i planned in the summer to do this whole project thanks to your amazing videos. Here i am now just finishing the the first part the clock and it feels so awesome and i cant wait to start building the rest. thanks for your detail and help with everything, you are fantastic.
Let me echo everyone else: these videos are amazing! You are a gifted teacher.
Absolutely love this series. I'm still building mine, following every step and learning so much. Thank you!
Looks super complicated but is simpler after mr Ben's explanations. Thank you very much sir
We just finished our version of this and posted the video. My son is 11 and is able to follow these instructions easily. Thanks, Ben!
Thanks a lot for this! I had a great time recreating this.
I hope it won't be too long before the next one in the series.
Hi guys,
If you don't have enough space available on the right side of the bread board you can use just 2 chips.
1 Inverter and 1 Nor: "(not SEL nor M) nor (SEL nor A) nor HLT"
or
1 Inverter chip and 1 AND chip: "not (SEL and not M) and not (not SEL and not A) and not HLT"
I have rather bulky power supply attached on the left side of the BB and this saved me from having to rework the whole layout.
You are the best teacher and the best electronic engineer.
I build it using 2 74HC00 and is working fine. It was great that you talked about the possibilities of using nand gates as I did not have the other chips at hand.
I'm so stoked to get started on this! I've been an electronics tinkerer for a large portion of my life, but I'm finally to the point where I'm wanting to learn deeper in the weeds rather than use a micro controller. I was digging through all of my spare parts, and I found that I've got everything I need to build this (with the exception of a 1uF cap and 1 555 timer. I even have the exact logic ICs I need! Once I've got this up and running I'll likely be ordering the 6502 kit, so excited!
I am enjoying this video series. I'm also glad you mentioned the use of only NAND and NOR gates.
Dislikes on this video really doesn't mean anything. Perfect work!
I guess cmos logic fanboys.
It’s amazing how having watched these videos in order from the SR latch, I - a music conservatory student who didn’t even do that well in high school science - understand everything that’s happening. Mind blown!
Was able to follow these videos with no prior knowledge of electrical engineering or circuit design. Great videos, thanks so much. Can't wait for the next module.
I just discovered your channel and have really enjoyed your projects.
The description of the various modes of the 555 timer are some of the best I've seen.
I've used the "triple nickle" timer for years and it is a very versatile part.
Being a recovering engineer, I am a big fan of simplicity. That said, I see a major optimization of your clock generator. With a few modifications, the entire circuit in part 4 can be implemented with a single 555. Since I can't put pictures into the comments, I'll have to use my words.
First, start with the astable circuit in part 1.
Now wire one section of the DPDT run/step switch so that it is between the discharge pin (7) and the resistors. The switch is connected so that in "run" mode, the timing resistors connect to pin 7 and in "step" mode, they connect to one side of the single-step button. The other side of the button connects to ground. This prevents the 555 from discharging the timing cap in "step" mode and once it reaches 2/3 Vcc, the output goes low and stays low. Pressing the button now performs this function and will allow the capacitor to discharge. When it reaches 1/3 Vcc, the output goes high. Releasing the button, lets it charge and after a slight delay, the output again goes low and stays there.
The other half of the run/step switch can be wired across the potentiometer, effectively bypassing it in "step" mode. This gives consistent step timing regardless of the pot setting.
Thanks again for some interesting and informative videos. I look forward to your next project.
It feels really good to see the clock coming together.
Just built the astable and monostable circuit
Need more parts for bistable and the full module but as I am actually following along I truly appreciate your content 🙌🏼🙌🏼🙌🏼
10:37 Might be good to use a red led to indicate that the system has been halted.
It's a good idea. However, it's something simple that you can just add on your own.
@@nicolasfiancoski6792 **> It's a good idea. However, it's something simple that you can just add on your own.**
[tongue-in-cheek] .....yeah....and people could just google **how to build an 8-bit computer** without watching the video.
@@WilliamLDeRieuxIV I mean you don't have to be an expert in electronics to connect a led
@@nicolasfiancoski6792 Connecting an LED isn't the problem (it requires no skill)......but knowing where in the circuit to connect.it does.
Sum up all these marvellous videos you have, it is more than what I learned in my college
Thank you so much for such an amazing explanation on how these gates work. I’ve gotten such a deeper understanding now. I plan to buy the entire kit and continue on with your amazing build.
Well there's no much to say, you have an incredible ability to explain such complex things I'm amazed!. Keep doing videos that way please, they contain the best fundamentals of computer hardware for beginners
I just finished building the 8-bit Computer Clock Module, and had a lot of fun doing it. One thing I noticed is that the photo on the cover of the handsome documentation I received is high enough resolution that it can be used as a wiring diagram: I wound up both consulting the picture as well as the traditional schematic that came with the documentation booklet. I only found one difference between the two: the two inputs to the first AND gate, pins 1 and 2 on the 74LS08, are wired in reverse in the photo from the pins described by the schematic (of course, it doesn't matter).
Ben encouraged us to modify the design to suit ourselves, and I did make two trivial changes to my build. I like the potentiometer to turn clockwise to increase the speed of the clock, so I just wired to the opposite side of it from that shown.
For selecting between free running and single step mode, Instead of the push-on-push-off button presented in the videos, Ben includes a slider switch that fits the breadboard better. If one uses the same pinouts for the slider switch as in the tutorial, then the left hand position of the switch is the "single step" position, and the right hand position is "free running" mode. I wanted the sense to be the other way around, so I just reversed the wiring of the switch so that the left hand position is the free running mode one.
This was my solo Christmas Day project this year, and I reflected, as I worked, that I hadn't built an electronics kit on Christmas Day since at least 1978.
It occurs to me that the provided three logic chips in the clock kit are sufficient to demo all of the latch/flip-flop exercises which immediately follow this video in the series.
Thanks, Ben.
Thank you so much for explaining this all! I just finished all 4 videos and completed my clock! Im onto the computer part next!(Thats where I originally started lol)
This is all a great explanation of (imho) not so easy topic to grasp in the first place, especially for one like me who doesn't have any electronics background. I'm doing this slow and steady in a form of github project so keeping a readme file explaining all of this in my own words helps a lot, too.
Thank you so much for all the videos and extraordinary amount of work you put into it to explain it so well!
Great vid, Ben! I've just finished implementing this circuit; however, the OR gate had an output of 2.2v which the AND gate couldn't detect as high logic. The clock signal from the AND gate would flash but wasn't in sync with the original clock signal. I amplified the signal with a 2N3904 NPN and fed it back into the AND gate, and it worked. It uses a lot of power, and the output power is almost half the input which is not efficient at all.
Oh here he comes
He is Ben Eater
Your videos are among the best things in internet nowadays, thank you very very much!
These videos fantastic! I'm binge watching these faster than a netflix series. Thanks for making these available!
Awesome video, keep it up! Just one thing, I'd at least leave the LED signifying whether the switch is on or off in, since you can't rely on the output to see what mode it's in when the hlt is plugged to 5v.
You made easy and straight mind-blowing arguments (for me). Thank you very much!
I've finished the clock! I'm so excited and now I've gotta go get more wire. WAY more wire.
I had to use 74LS00's to do the switching and halt logic, and I was able to follow your diagram that shows how that might be done. I'm a programmer but with electronics I'm a total beginner. Thanks so much for this!
I've watched all your videos probably 10 times each and a copy of that book is in the mail. Someone also recommended "The Art Of Electronics" and I'll probably be getting that one too. I'm super interested to see how the control works.
More videos!!!
Completed my clock circuit as well! Works like a champ! Thank you for all the work you put into these videos Ben! Having built my own clock circuit based off your videos, I have a lot of respect for you in terms of how much work this actually takes. =) Keep em coming!
The Redstone part of my brain is just begging to compact this.
OMG SAME!!!
Same here... Built almost an exact replica of this computer in redstone too. And I'm working on coding a logic simulation so I can recreate it there too.
1024 I’m interested in seeing this redstone computer you made! How big is it?
@@KingJellyfishII I'd also be interested in seeing your computer
@@jetison333 @SKM GEEK well it's not 1000% functional rn (AND ITS IN PE! What was I thinking?!) So I'll port it over to java and fix it soonish.
Can't wait fir the instruction decoder!
+Luke Gary And, most importantly, the control unit ;)
But if you're curious how it works, check out my comment under his last video before the clock tutorial. I figured out some pieces of it already from his previous videos, so you can get some idea of how does it work and how to make one ourself. But I can't wait to see +Ben Eater's tutorials on that too, because his explanations are very clear and useful :)
Great videos Ben! Thank you so much, I usually don't comment but I'm a big fan. I've done both of the EEPROM programmer videos by hand and through an Arduino Nano and now I'm setting up to do the 6502 chip. I can't wait! Thank you for all your hard work.
Great job Ben! I did CS over 20 years ago and did 2 semesters of EE as part of my degree. I've continued to dabble in building basic circuits since then. Your tutorials are great. I'm planning on following and building along. I write code for a living, but this is the fun stuff... except for K-Maps... that wasn't too fun. haha
Every Computer Science Should be watching your videos
Nice I completed the clock build it worked perfectly, nice stable debouched clock and control design :)
excellent videos, I was able to follow them and properly create the clock.
thank you. this has been an awful lot of fun to do in 2023
Great videos! I just watched the 4 parts for the clock. Best way to understand 555 and the computer clocking logic!
This guy has a character of the genius: building things from the bare basics.
PSA: The 555 can be powered by 9v and it is tempting to do so when building the circuit up on your breadboard (independent of buying the kit); BE SURE TO CHANGE TO 5v to continue to the logic chips and on to the 6502.
Thank you so much i was struggling with this exact problem and this just made me figure out why the circuit wasnt working. THANK YOU!!!!
Got it done ! woo hoo ; thank you Ben for your thoughtful lessons ; from a first time electronics guy very exciting stuff, thank you so much for your time
I like a 7402 quad 2input Nor for the astable/monostable select ... the inverted switch output goes to the astable pulse nor gate, the direct switch line goes to the monostable pulse nor gate, the both outputs go to a nor gate. Inverting the outputs of the first stage allow an OR to work like an AND and since the clocks are inverted twice through the Nors, the clock is back into phase. The fourth Nor can be used for the switch line inverter.
If clock can idle High when halted, you can combine the clock line with a single positive OR, and don't have to invert the Halt line.
6:08 "They are like 50cents or something, i dont know what these cost." Sounds like such a baller sentence.
Why would you take LEDs out? The more blinkenlights the better.
whatever you do don't forget to add pull up resistors on the logic gates, i don't know how ben's doing fine without them but my chips burnt up and i had to order replacements. still works mighty fine for clocking the 6502 computer
I would add halt-led to indicate why it's stopped. Great videos.
It is really nice and very understandable explanation of very usefull things. Thank you very much
Best videos on youtube. Can't thank you enough for these.
Can't wait for the next part!
Really excellent explanations, I love it !
For those who would give it a try but have no hardware (yet...) : software SimulIDE (open source) can simulate that. Lot of fun !
I think you can make the the entire timer circuit with only 4 IC’s (2 555 timers and 2 NOR gates) if you change a few things. First, switch out the 555 timer for the toggle switch for a NOR IC (since you can make an SR latch with 2 NOR gates, and so you can use the inverted output with the logic circuit). Use the remaining two NOR gates on the chip to invert the astable and manual clock outputs. Use the second NOR gate for the logic:
((a NOR q’) NOR (b NOR q)) NOR hlt
where a is the inverted astable clock output, b is the inverted manual clock output, q and q’ are the regular and inverted SR latch outputs, and hlt is the halt signal for the programming.
There is a chance this doesn’t actually work, as I did this all in my head and didn’t think about it for very long. I will definitely try it out myself, since this project seems like a lot of fun, and I’m always open to learning more about electronics. If anyone sees a flaw in my idea for this, your comment would be appreciated.
That is... a really nice idea! At least without test, I will try it on paper first. You can also use a NE556 instead of two 555 :).
Ben, thank you for a great set of videos on the clock module. I really appreciate your clear descriptions of how these circuits are functioning.
I'm really looking forward to the next step in this series. You didn't mention in the video where you plan to go next?
Very interesting projects, very clean explanations, very good skills. Congratulations!
What a fantastic series! Thanks Ben
Вау... как же красиво и завораживающе это смотрится... спасибо за видео 😘
Thanks for the clear explanation, you can explain really well.
The first four have been superb, Ben. I'm looking forward to the rest!
The SOP section begs for NAND (that, or the voices in my head). I'd keep the inverters though. Then you just tack one more NOT gate at the end to turn the final AND into a NAND. 4 NAND, 3 NOT, 2 chips. And still easy to understand.
Amazing videos Ben. Informative, clear, interesting and the list goes on. Thanks a lot!
Tres bien, j'ai appris pleins de truc sur les portes et NE555.
Merci.
I remember seeing somewhere that 555 timer is the number one most sold chip, which is the most successful chip in semiconductor history!
I know that everything you've done here is to make this build as easy to understand as possible, but it should be known to those that may not want to solder different pins to the toggle switch, you don't have to have it straddling the centre, you can move it to either side of the board. Since the pins on the other side aren't used it won't be an issue if they're connected together. I've built this and I put my toggle switch below my trimmer pot on the edge of the board because I have a rats nest of jumper wires to press through. I'm thinking of using one of my 556's to reduce the space.. I might even get a pcb made and make it permanent. It's a nifty circuit.
I lowkey jumped when you tool out that one resister without killing the circuits power
Great tutorial(s) - can't thank you enough for sharing. For what it's worth, you're about to become my first ever subscription. Very informative, but also seeing the thought process involved is invaluable. Again, thanks.