When my wfie & I were watching the Ben Eater series, one of the use cases I gave her for the use of the LEDs & switches was a Power LED to show that it was plugged in and an On LED to show that power was flowing. This is a safety feature. This came to mind when you pointed out that there was 5V flowing on a segment of your board even though no lights were on. Enjoying your series so far!
9:35 - I ran into this double clock tick issue on my manual pulse as well. Per someone else's suggestion, I tried replacing the 0.1uF capacitor with another value. I tried a few different values until I found a value that felt right. In my case, that was 0.22uF. 16:25 - Great explanation on the difference between LS and HCT. I found it quite difficult to get all the different LS chips, but eventually I rounded them all up. Good to know there is a better alternative.
Really liking the additional information you give on your modifications. I'm currently working on the original SAP-1, 2 and 3 designs and copying/building/learning about Ben Eaters design. Also busy planning out how to make it better once I have it completed. Videos like yours are extremely helpful and informative :)
To my great shame, I must admit I never looked at any of the official "SAP" designs in Malvino's book :) I just watched Ben's video series, and of course I know quite a bit about CPU architectures viewed from the programmer's side due to my career in software development. So my CPU is probably a bit of a hodgepodge. I also drew inspiration from the so-called "Scott CPU" design, which is presented here: th-cam.com/video/cNN_tTXABUA/w-d-xo.html. There's even a great javascript simulator for it here: www.buthowdoitknow.com/but_how_do_it_know_cpu_model.html
This clock is so good from the point of view of teaching (which is, after all, Ben's background) because you end up needing a 555 in all 3 of it's "modes" so you have an "excuse" to teach them all. On the subject of teaching... thanks for the on/off switch... I'd never thought of using a transistor in this way before... it should be obvious, but I never thought of it... so that's something you've taught me already. :)
Oh... I obviously don't remember things that well... because I've just seen another comment from me, 3 years ago, talking about the PNP transistor... :/ ... maybe i'll remember it this time. :/
@4:13 I recommend to add a resistor (say Rpu) between the Base and Emitter of this transistor and the Rpu should be of larger value that the total resistance made up by the LED and the resistor connecting it to ground. This Rpu resistor can act as a pull up resistor to prevent a stray components causing accidental switching of power. It is just for saftey measure.
Hi, did you consider using a mosfet for the power switch? I know it’s not of the same era as the 74 series but it would be much more appropriate to high current switching in terms of efficiency.
For my particular power switch, I actually WANT a bipolar transistor, since I'm using the base current to light the "power on" LED ;) the 74 chip series I'm using, 74HCT, does actually use mosfet as far as I know.
I personally wanted to use CMOS since I started for lower power consumption (which is a problem in a breadboard). So I'm going to use HC/HCT chips for the breadboard "prototype" and then etch a PCB (stripboards would be a PITA to solder and ordering a PCB would be too expensive). I'm also planning on using SMD for the PCB version for using less space and using the AHC/AHCT series chips for high-speed (up to 100 MHz or so). I'll need a higher frequency oscillator than a 555 timer for that matter, though.
I tested it and I actually was able to get it to about 800 kHz with a relatively good square wave. At 900 kHz it's no longer a square wave and unstable. Julian Illet was able to pull it up to almost 1.2 MHz, though it was very unstable. There's also the CMOS version, the 7555, and Julian was able to get it to about 2.24 MHz (almost double), though again it was unstable and difficult to reach. You can watch Julian's video here: th-cam.com/video/TCz1erC2onQ/w-d-xo.html
There are companies that make PCBs cheap. You do have to buy somewhere between 5 - 10 at a time with a cost as low as $2 each so you're talking about $20 per run. That could be considered expensive if you really only need one, but in the case of this project, several of the boards are identical or nearly so. For those variations, you can design the boards to use jumpers to handle the slight variations. Even at having to effectively spend $20 for a board, if you think of the time, mess and even cost for etching, you're better off having the board made.
Well, I remember, at school, never quite understanding myself what they were good for. And only discovered this useful application when actually building the power switch ;)
The emitter-base current, although just a few mA, is still pretty large, and therefore the transistor will be saturated. Saturated means emitter-collector voltage drop is negligible. I think on my board it's 0.1 V or there about. A saturated transistor really does act like a switch.
Hello again. I'm wondering if you have checked your duty cycle on your clock module? I've been having a look at the clock module circuit quite a bit lately because I've been making a PCB version of it, and I'm noticing that the duty cycle ranges quite a bit especially at higher clock speeds. My breadboard computer works, so I guess it doesn't really matter ... but I thought the duty cycle was supposed to 50.00%. At the very least, it seems this clock module could use some improvements. Have you checked your duty cycle at various clock speeds?
No, I haven't. I don't have an oscilloscope, so I wouldn't even know how to check ... :/ My guess, is that the 555 chip isn't really a reliable clock generator. After all, the exact timing is determined by the values of the resistors and capacities connected to it, and those are only accurate to about 10% I believe. For more reliable clocking, I guess a crystal-based solution is necessary.
I did some google searching which led to some experimenting. If I run the output of the 555 into a 74XX161(a counting IC), the resulting output seems to be a perfect 50% duty cycle, though it does cut your frequency in half. Again, my breadboard computer works so it doesn't really matter. I just thought it was an interesting point that my CLOCK and NOT_CLOCK signals were uneven. (Significantly uneven at the higher frequencies.) I also found this link (below) which shows a "better timing" 555 circuit which says "The frequency can be varied over a wide range while maintaining a constant 50% duty-cycle." electronics.stackexchange.com/a/237678
Ha! You caught me out :) It is connected in series to the second resistor. The diagram suggests that the end of the pot is connected to the second resistor, which is not the case. "SPD" is just the label I have on the breadboard for the plastic dial. It's not a signal.
Well, it all depends on how much current your computer will draw. Mine draws about 300mA it turns out, and so I can get away with a transistor rated for 1.5A.
I got mine here th-cam.com/users/redirect?event=comments&stzid=UgwhijnuVvgJgmWaWZx4AaABAg.8d3UaL0fDFt8d3cBruFgMg&q=https%3A%2F%2Fwww.conrad.de%2Fde%2Fusb-steckverbinder-printmontage-buchse-gerade-typ-a-usb-buchse-typ-a-inhalt-1-st-774854.html&redir_token=KG_Q_h2KN8c6AQSPL52bbD1Uash8MTU0NjQ0OTI2OUAxNTQ2MzYyODY5
Good question! It is a 74HCT32 (4x 2-input OR gate). It is the OR-gate used to combine the PROG switch (located just to the right) with the PGM control signal (coming from the control logic). The result is fed into the highest-order bit of the RAM address, and drives the PGM led to show we're accessing program memory. I actually talk about it here th-cam.com/video/hRJO97PbPlw/w-d-xo.htmlm42s, but I admit that I never say where it is physically located. Sorry for that! :)
I personally use a micro USB B to pin header module I bought in China. The good thing about it is that USB A - micro USB cables are more readily available than USB A - USB A cables.
All the USB B headers I can find have the pins in a square. I think I will just cut off the data pins. Is that what you did ? Regarding A to A cables sone old external drives had 2 USB A connectors to give more power. If you have one of these cables lying around it works as an A to A for power just ignore or cut off the connector that went to the drive..
I use a so-called "power transistor": it's job is to switch on or off a "large" current (Emitter -> Collector) using a small control current (Emitter -> Base). It therefore needs to support whatever current your computer needs through its collector. I choose a 1.5A-rated transistor. My computer draws about 300mA, so that's fine. I think I got this one: www.conrad.de/de/p/on-semiconductor-transistor-bjt-diskret-bd14016stu-to-126-anzahl-kanaele-1-pnp-1263040.html The important metric is the collector current "Ic", which as you can see, is 1.5A.
Well all of that depends on YOUR resistance of course. And that can vary immensely based on your physique, the air around you, how dry/wet you are, how close the two contact points are on your body, etc. The maximum voltage is 5V. Let's say the danger starts at 10mA. Then if your resistance ever drops below 5V/10mA = 500Ohm, you'll be in trouble. I think it's always a good idea to be careful when electricity is involved :)
Hello very good job u have done there, i am also very keen to do this type of project could uplease send me circuit diagrams for this project much appreciated.
When my wfie & I were watching the Ben Eater series, one of the use cases I gave her for the use of the LEDs & switches was a Power LED to show that it was plugged in and an On LED to show that power was flowing. This is a safety feature.
This came to mind when you pointed out that there was 5V flowing on a segment of your board even though no lights were on.
Enjoying your series so far!
9:35 - I ran into this double clock tick issue on my manual pulse as well. Per someone else's suggestion, I tried replacing the 0.1uF capacitor with another value. I tried a few different values until I found a value that felt right. In my case, that was 0.22uF.
16:25 - Great explanation on the difference between LS and HCT. I found it quite difficult to get all the different LS chips, but eventually I rounded them all up. Good to know there is a better alternative.
yeah, I think a 100ms pulse was a little too optimistic on Ben Eater's part. 200-300ms seems more appropriate ;)
In Ben Eater's latest video about "What is a Stack?" @6:13, he talks about his fix for this problem by putting a 0.1uF capacitor across the switch.
Great additional series. I also found the LS vs HCT section very informative. Working my way through your changes and really enjoying them.
Really liking the additional information you give on your modifications. I'm currently working on the original SAP-1, 2 and 3 designs and copying/building/learning about Ben Eaters design. Also busy planning out how to make it better once I have it completed. Videos like yours are extremely helpful and informative :)
To my great shame, I must admit I never looked at any of the official "SAP" designs in Malvino's book :) I just watched Ben's video series, and of course I know quite a bit about CPU architectures viewed from the programmer's side due to my career in software development. So my CPU is probably a bit of a hodgepodge. I also drew inspiration from the so-called "Scott CPU" design, which is presented here: th-cam.com/video/cNN_tTXABUA/w-d-xo.html.
There's even a great javascript simulator for it here: www.buthowdoitknow.com/but_how_do_it_know_cpu_model.html
This clock is so good from the point of view of teaching (which is, after all, Ben's background) because you end up needing a 555 in all 3 of it's "modes" so you have an "excuse" to teach them all.
On the subject of teaching... thanks for the on/off switch... I'd never thought of using a transistor in this way before... it should be obvious, but I never thought of it... so that's something you've taught me already. :)
Oh... I obviously don't remember things that well... because I've just seen another comment from me, 3 years ago, talking about the PNP transistor... :/ ... maybe i'll remember it this time. :/
@4:13 I recommend to add a resistor (say Rpu) between the Base and Emitter of this transistor and the Rpu should be of larger value that the total resistance made up by the LED and the resistor connecting it to ground. This Rpu resistor can act as a pull up resistor to prevent a stray components causing accidental switching of power. It is just for saftey measure.
Hi, did you consider using a mosfet for the power switch? I know it’s not of the same era as the 74 series but it would be much more appropriate to high current switching in terms of efficiency.
For my particular power switch, I actually WANT a bipolar transistor, since I'm using the base current to light the "power on" LED ;)
the 74 chip series I'm using, 74HCT, does actually use mosfet as far as I know.
I personally wanted to use CMOS since I started for lower power consumption (which is a problem in a breadboard). So I'm going to use HC/HCT chips for the breadboard "prototype" and then etch a PCB (stripboards would be a PITA to solder and ordering a PCB would be too expensive). I'm also planning on using SMD for the PCB version for using less space and using the AHC/AHCT series chips for high-speed (up to 100 MHz or so). I'll need a higher frequency oscillator than a 555 timer for that matter, though.
definitely. I think the 555 can't go much faster than a few 100 kHz. That's my totally subjective impression anyway, without a proper oscilloscope :)
I tested it and I actually was able to get it to about 800 kHz with a relatively good square wave. At 900 kHz it's no longer a square wave and unstable. Julian Illet was able to pull it up to almost 1.2 MHz, though it was very unstable. There's also the CMOS version, the 7555, and Julian was able to get it to about 2.24 MHz (almost double), though again it was unstable and difficult to reach. You can watch Julian's video here: th-cam.com/video/TCz1erC2onQ/w-d-xo.html
There are companies that make PCBs cheap. You do have to buy somewhere between 5 - 10 at a time with a cost as low as $2 each so you're talking about $20 per run.
That could be considered expensive if you really only need one, but in the case of this project, several of the boards are identical or nearly so. For those variations, you can design the boards to use jumpers to handle the slight variations.
Even at having to effectively spend $20 for a board, if you think of the time, mess and even cost for etching, you're better off having the board made.
That was a good surprise. I was expecting this to be all about 74 series chips and you've explained PNP to me... I've never used PNP before.
Well, I remember, at school, never quite understanding myself what they were good for. And only discovered this useful application when actually building the power switch ;)
Yes... the same!
What about the voltage drop of the power transistor? 300mA= maybe BE used more LS chips where you use HC/HCT.
The emitter-base current, although just a few mA, is still pretty large, and therefore the transistor will be saturated. Saturated means emitter-collector voltage drop is negligible. I think on my board it's 0.1 V or there about. A saturated transistor really does act like a switch.
Hello again. I'm wondering if you have checked your duty cycle on your clock module? I've been having a look at the clock module circuit quite a bit lately because I've been making a PCB version of it, and I'm noticing that the duty cycle ranges quite a bit especially at higher clock speeds. My breadboard computer works, so I guess it doesn't really matter ... but I thought the duty cycle was supposed to 50.00%. At the very least, it seems this clock module could use some improvements. Have you checked your duty cycle at various clock speeds?
No, I haven't. I don't have an oscilloscope, so I wouldn't even know how to check ... :/
My guess, is that the 555 chip isn't really a reliable clock generator. After all, the exact timing is determined by the values of the resistors and capacities connected to it, and those are only accurate to about 10% I believe.
For more reliable clocking, I guess a crystal-based solution is necessary.
I did some google searching which led to some experimenting. If I run the output of the 555 into a 74XX161(a counting IC), the resulting output seems to be a perfect 50% duty cycle, though it does cut your frequency in half. Again, my breadboard computer works so it doesn't really matter. I just thought it was an interesting point that my CLOCK and NOT_CLOCK signals were uneven. (Significantly uneven at the higher frequencies.) I also found this link (below) which shows a "better timing" 555 circuit which says "The frequency can be varied over a wide range while maintaining a constant 50% duty-cycle."
electronics.stackexchange.com/a/237678
Hi James. On the clock schematic, where is the wiper of the pot connected. You have it labeled SPD but I cannot find it. Thanks.
Ha! You caught me out :) It is connected in series to the second resistor. The diagram suggests that the end of the pot is connected to the second resistor, which is not the case. "SPD" is just the label I have on the breadboard for the plastic dial. It's not a signal.
That PNP Transistor, what value do you recommend? It should be at least 1A? Thanks
Well, it all depends on how much current your computer will draw. Mine draws about 300mA it turns out, and so I can get away with a transistor rated for 1.5A.
Where did you buy the usb header on the breadboard? I can't find something simular...
I got mine here th-cam.com/users/redirect?event=comments&stzid=UgwhijnuVvgJgmWaWZx4AaABAg.8d3UaL0fDFt8d3cBruFgMg&q=https%3A%2F%2Fwww.conrad.de%2Fde%2Fusb-steckverbinder-printmontage-buchse-gerade-typ-a-usb-buchse-typ-a-inhalt-1-st-774854.html&redir_token=KG_Q_h2KN8c6AQSPL52bbD1Uash8MTU0NjQ0OTI2OUAxNTQ2MzYyODY5
Hi James, what ist the most right chip on the clock module, I can`t get any information about it in the video and the schematics, thanks!!
Good question! It is a 74HCT32 (4x 2-input OR gate). It is the OR-gate used to combine the PROG switch (located just to the right) with the PGM control signal (coming from the control logic). The result is fed into the highest-order bit of the RAM address, and drives the PGM led to show we're accessing program memory.
I actually talk about it here th-cam.com/video/hRJO97PbPlw/w-d-xo.htmlm42s, but I admit that I never say where it is physically located. Sorry for that! :)
Can you please put a link to where you bought the plug for the usb?
I tried to look for it and it seem that I can't found any place to buy the plug.
Here's where I got mine!
www.conrad.de/de/usb-steckverbinder-printmontage-buchse-gerade-typ-a-usb-buchse-typ-a-inhalt-1-st-774854.html
Thank you
Also cpc.farnell.com/lumberg/2410-01/usb-panel-socket-pcb-type-a/dp/CN10730?st=USB%20Socket%20PCB if you are in the UK
I personally use a micro USB B to pin header module I bought in China. The good thing about it is that USB A - micro USB cables are more readily available than USB A - USB A cables.
All the USB B headers I can find have the pins in a square. I think I will just cut off the data pins.
Is that what you did ?
Regarding A to A cables sone old external drives had 2 USB A connectors to give more power. If you have one of these cables lying around it works as an A to A for power just ignore or cut off the connector that went to the drive..
Hi James, what type of PNP transistor you recommend to use?
I use a so-called "power transistor": it's job is to switch on or off a "large" current (Emitter -> Collector) using a small control current (Emitter -> Base). It therefore needs to support whatever current your computer needs through its collector. I choose a 1.5A-rated transistor. My computer draws about 300mA, so that's fine.
I think I got this one: www.conrad.de/de/p/on-semiconductor-transistor-bjt-diskret-bd14016stu-to-126-anzahl-kanaele-1-pnp-1263040.html
The important metric is the collector current "Ic", which as you can see, is 1.5A.
Is this amount of current dangerous when you touch it? - Can you touch the wires of the CPU?
Well all of that depends on YOUR resistance of course. And that can vary immensely based on your physique, the air around you, how dry/wet you are, how close the two contact points are on your body, etc.
The maximum voltage is 5V. Let's say the danger starts at 10mA. Then if your resistance ever drops below 5V/10mA = 500Ohm, you'll be in trouble.
I think it's always a good idea to be careful when electricity is involved :)
You're not very likely to ever be 500 ohms through your skin.
Do you live in Germany and do you have some tips for ordering chips without importing them.
Because i couldn't find the eeprom on conrad and so on.
Bitte schön ;)
www.reichelt.de/-EE-Flash-Eproms/28C64-150/3/index.html?ACTION=3&LA=2&ARTICLE=1946&GROUPID=4510&artnr=28C64-150&trstct=pol_9
Danke für das schnelle Antworten :).
...your finger isn't slower - it's just more inductive...
Hello very good job u have done there, i am also very keen to do this type of project could uplease send me circuit diagrams for this project much appreciated.
They are all available here: github.com/jamesbates/jcpu/tree/master/schematics
there is a problem with this video, it been load very very slow.
Strange... do any other of the videos load slowly?
No