My Ben Eater inspired homemade 8-bit CPU - Part 2: Power & Clock

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น • 56

  • @PrometheanConsulting
    @PrometheanConsulting 3 ปีที่แล้ว +1

    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!

  • @davidcourtney1398
    @davidcourtney1398 7 ปีที่แล้ว +9

    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.

    • @jimmyb998
      @jimmyb998  7 ปีที่แล้ว

      yeah, I think a 100ms pulse was a little too optimistic on Ben Eater's part. 200-300ms seems more appropriate ;)

    • @xedover
      @xedover 4 ปีที่แล้ว

      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.

  • @deanmcdonnell1200
    @deanmcdonnell1200 6 ปีที่แล้ว +2

    Great additional series. I also found the LS vs HCT section very informative. Working my way through your changes and really enjoying them.

  • @SiggyPony
    @SiggyPony 6 ปีที่แล้ว +3

    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 :)

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว +1

      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

  • @edgeeffect
    @edgeeffect 4 ปีที่แล้ว +1

    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. :)

    • @edgeeffect
      @edgeeffect 4 ปีที่แล้ว

      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. :/

  • @fifaham
    @fifaham 10 หลายเดือนก่อน

    @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.

  • @davidpirlot8141
    @davidpirlot8141 5 ปีที่แล้ว +4

    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.

    • @jimmyb998
      @jimmyb998  3 ปีที่แล้ว

      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.

  • @GRBtutorials
    @GRBtutorials 6 ปีที่แล้ว +2

    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.

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว +2

      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 :)

    • @GRBtutorials
      @GRBtutorials 6 ปีที่แล้ว +1

      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

    • @danman32
      @danman32 3 ปีที่แล้ว

      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.

  • @edgeeffect
    @edgeeffect 7 ปีที่แล้ว +2

    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.

    • @jimmyb998
      @jimmyb998  7 ปีที่แล้ว +1

      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 ;)

    • @edgeeffect
      @edgeeffect 7 ปีที่แล้ว

      Yes... the same!

  • @protonjinx
    @protonjinx 5 ปีที่แล้ว +1

    What about the voltage drop of the power transistor? 300mA= maybe BE used more LS chips where you use HC/HCT.

    • @jimmyb998
      @jimmyb998  5 ปีที่แล้ว +1

      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.

  • @davidcourtney1398
    @davidcourtney1398 4 ปีที่แล้ว

    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?

    • @jimmyb998
      @jimmyb998  4 ปีที่แล้ว

      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.

    • @davidcourtney1398
      @davidcourtney1398 4 ปีที่แล้ว +1

      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

  • @ChrisPavey85
    @ChrisPavey85 5 ปีที่แล้ว

    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.

    • @jimmyb998
      @jimmyb998  4 ปีที่แล้ว

      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.

  • @rafaelmmartinez9170
    @rafaelmmartinez9170 4 ปีที่แล้ว

    That PNP Transistor, what value do you recommend? It should be at least 1A? Thanks

    • @jimmyb998
      @jimmyb998  4 ปีที่แล้ว

      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.

  • @petrolboerke
    @petrolboerke 6 ปีที่แล้ว

    Where did you buy the usb header on the breadboard? I can't find something simular...

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว

      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

  • @peterwtlprnft6136
    @peterwtlprnft6136 6 ปีที่แล้ว

    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!!

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว

      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! :)

  • @guykatz4971
    @guykatz4971 6 ปีที่แล้ว

    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.

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว +1

      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

    • @guykatz4971
      @guykatz4971 6 ปีที่แล้ว

      Thank you

    • @quenchize
      @quenchize 6 ปีที่แล้ว

      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

    • @GRBtutorials
      @GRBtutorials 6 ปีที่แล้ว

      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.

    • @quenchize
      @quenchize 6 ปีที่แล้ว

      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..

  • @JanMuller
    @JanMuller 5 ปีที่แล้ว

    Hi James, what type of PNP transistor you recommend to use?

    • @jimmyb998
      @jimmyb998  4 ปีที่แล้ว

      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.

  • @pgr4567
    @pgr4567 6 ปีที่แล้ว

    Is this amount of current dangerous when you touch it? - Can you touch the wires of the CPU?

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว +1

      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 :)

    • @danman32
      @danman32 3 ปีที่แล้ว

      You're not very likely to ever be 500 ohms through your skin.

  • @joejoetv1337
    @joejoetv1337 6 ปีที่แล้ว

    Do you live in Germany and do you have some tips for ordering chips without importing them.

    • @joejoetv1337
      @joejoetv1337 6 ปีที่แล้ว

      Because i couldn't find the eeprom on conrad and so on.

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว

      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

    • @joejoetv1337
      @joejoetv1337 6 ปีที่แล้ว

      Danke für das schnelle Antworten :).

  • @stefankrause5138
    @stefankrause5138 4 ปีที่แล้ว

    ...your finger isn't slower - it's just more inductive...

  • @zahoorahmed8334
    @zahoorahmed8334 6 ปีที่แล้ว

    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.

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว

      They are all available here: github.com/jamesbates/jcpu/tree/master/schematics

  • @guykatz4971
    @guykatz4971 6 ปีที่แล้ว +1

    there is a problem with this video, it been load very very slow.

    • @jimmyb998
      @jimmyb998  6 ปีที่แล้ว

      Strange... do any other of the videos load slowly?

    • @guykatz4971
      @guykatz4971 6 ปีที่แล้ว

      No