8-bit Breadboard Computer - Program Counter Replacement

Поділитися
Вставка
  • Опубліковано 8 вер 2024

КОМЕНТАРІ • 112

  • @JGaryThompson
    @JGaryThompson 7 років тому +9

    Looking forward to the next video!

  • @Friendroid
    @Friendroid 7 років тому +4

    Always a pleasure to watch your videos, Julian.

  • @MrTimAway
    @MrTimAway 7 років тому +4

    What you have built here is actually a pretty basic FSM (finite state machine). The states are being stored in the LS273 D-Flip Flops and the combinatorial logic to determine the next state is being realised with your memory. You can do some pretty cool stuff if you add a combinatorial output circuit that takes the current state, and optionally inputs (Mealy), into account.

    • @JulianIlett
      @JulianIlett  7 років тому +3

      The fun should start when I connect the flag bit to address input A10 on the RAM chips. That's a branch to the other half of program memory :)

  • @Dennis-mq6or
    @Dennis-mq6or 7 років тому

    Excellent presentation Julian.
    I used to shudder while watching some of your older presentations; but you have aged well and this is probably the best yet!
    Congratulations!

  • @IAmCavH
    @IAmCavH 7 років тому +2

    I love your videos Julian, I'm very excited to see where this project will go. I love your Penny Organ project too!

    • @JulianIlett
      @JulianIlett  7 років тому +3

      Cheers - I must dig out the penny organ - it's one of my 8 major projects.

  • @VintageProjectDE
    @VintageProjectDE 7 років тому +1

    Pretty amazing concept. Thank you for sharing this, Julian!

  • @georgestewart5879
    @georgestewart5879 7 років тому +1

    Really interesting Julian, lost me a bit in the middle but it sort of fell into place by the end, I think. Thanks for keeping my brain from slowly trundling to a halt.

  • @DavidWatts
    @DavidWatts 7 років тому

    Julian, I literally love these videos. You are actually able to get this stuff through my thick skull. Thanks mate.

  • @JerryEricsson
    @JerryEricsson 7 років тому +3

    OH my, visions of the Lost In Space computer! WOW I do love your building from scratch instead of programming the Arduino, even though I am still at the Arduino stage in my development.

    • @JulianIlett
      @JulianIlett  7 років тому +1

      I'll be returning to the Arduino again soon, when I convert my OLED Ammeter into a Wattmater :)

  • @markflack9191
    @markflack9191 7 років тому +5

    This seems to be getting very complicated, but I guess computers are complicated.
    Great fun watching you build it.

    • @AndersJackson
      @AndersJackson 7 років тому

      Yes, computers are complicated. I have looked into some previous constructions, like the Digital PDP 8 mini computers, when a mini computer was run by a department in a company or University. Fun, but a bit complicated, with a couple of hundred flip chips, each with a functionality of a TTL chip.

  • @raymondheath7668
    @raymondheath7668 7 років тому +1

    I incorporated your 555 circuit into most of my current and future low frequency counters

    • @JulianIlett
      @JulianIlett  7 років тому

      Oh cool, good to hear. Cheers Raymond

  • @XFolf
    @XFolf 7 років тому

    Really enjoying this series of vids!! Really looking forward to the next stage!

  • @farzadb82
    @farzadb82 7 років тому

    Very interesting series. Thank you for taking the time to make these videos.
    On a side note, you may want to take a look at the 269 in the 7400 series ICs. The 269 is a 8 bit biinary up/down counter with the ability to be preset with an initial starting value. This should eliminate the need to have a second RAM chip dedicated for use as a program counter. Looking on ebay these should be readily available in 74F flavor and should help keep the overall cost low.

  • @bradscott3165
    @bradscott3165 7 років тому +3

    This is how microcode units work all the way back to the PDP/11.

  • @VoidHalo
    @VoidHalo 5 років тому

    Great video. I'm definitely gonna have to try this myself. Only difference I would make would be to use an AT28C16 EEPROM in place of one or both SRAM chips. I've found they still (mostly)enter a write cycle using a tactile switch without worrying much about the write pulse being 50 to 1000ns as the datasheet suggests. Ben Eater made a video about them and used an RC circuit for the timing but it seems you can get away without using it. Probably not the greatest idea, though.

  • @RWBHere
    @RWBHere 7 років тому

    A paper tape reader could be implemented using something like a stepper motor, or perhaps a repurposed scanner or printer mechanism. Heading towards Julian Ilett's re-creation of a PDP-8, somewhere along the road! Thanks for the update, and explanation; I'm just about keeping up with it so far.

  • @AndersJackson
    @AndersJackson 7 років тому

    You have done a microcode instruction execution part of a microcode programming CPU.
    Cool. You just need a Instruction register which loads a micro code address for each CPU instruction.
    Thanks for an interesting project.

  • @squirrelsrus1
    @squirrelsrus1 7 років тому +3

    I guess I am missing why this is better than the 8-bit counter you previously had.

    • @JulianIlett
      @JulianIlett  7 років тому

      I was having real difficulties working out how to write to the program counter with a simple two-phase clock. Jeff's design provided an elegant solution.

    • @squirrelsrus1
      @squirrelsrus1 7 років тому

      Two-phase clock? Isn't this functionally accomplishing what you already had except now you need another chip to keep the instructions. Sorry for the questions... I'm just trying to wrap my head around this.

    • @JulianIlett
      @JulianIlett  7 років тому

      The new functionality is completely flexible unconditional jumps (GOTOs) and a mechanism for separate 'setup' and 'loop' code sections.

    • @squirrelsrus1
      @squirrelsrus1 7 років тому

      I see... As you demonstrated by restarting at a different address. Assuming you only wanted to count up 8 bits and reset at 0, would there be any advantage to the new method?

    • @Dippo6905
      @Dippo6905 7 років тому

      I agree that Julian didn't explain it well, but what he created now gives more control over the program. You can now order the counter to start from 0, run till 9, move to 5. Otherwise you must do a ugly hack that is hard to explain for everybody. The solution he took with this design looks expensive, but is actually very elegant.

  • @DoRC
    @DoRC 7 років тому +1

    5:50 the way you numbered those makes my OCD twitch...

  • @JasonMasters
    @JasonMasters 7 років тому

    It looks a bit like a One Instruction Set Computer (OISC). The idea is that it can only execute one instruction, so there's no need for instruction interpretation so all the RAM contains is opcodes for the instruction to work with.
    One example is a computer which only does "move A to B then jump to C." Mathematics is done via reading tables stored in the memory and it also needs to modify its own program during execution in order to make conditional execution possible.

    • @JulianIlett
      @JulianIlett  7 років тому

      Yes, that's exactly how this works now. But A and B are in one memory space. C is in a different space. Kind of Harvard like :)

    • @JulianIlett
      @JulianIlett  7 років тому

      I think I can do conditional jumps without self-modifying code.

  • @makingsense2268
    @makingsense2268 7 років тому

    This is really cool, but more wire colours would really aid comprehensibility.

    • @JulianIlett
      @JulianIlett  7 років тому +1

      I bought packs of different coloured wires and I will use them when I've finished changing my mind about the design :)

  • @DepressedNOF
    @DepressedNOF 7 років тому

    Maybe I'm wrong with this, but isn't it much better to have the address increase on every step, except if a JUMP instruction occurs?
    Let's say you define the value 0xFF as JUMP (0xXX as something not equal to 0xFF):
    0x00: 0xXX,
    0x01: 0xXX,
    0x02: 0xFF, - JUMP Instruction
    0x03: 0x00 - jump addr
    So you run your program freely until a JUMP + 0x01, Latch the RAM data from JUMP + 0x01 and then load the latched value into inputs of the counter.
    I know it would take 2 clocks for a jump, but shouldn't good code avoid jumps if possible?

  • @CrayZeApe
    @CrayZeApe 7 років тому +2

    A bootstrap ROM built from a diode matrix could be fun once you've decided on an instruction set :)

    • @JulianIlett
      @JulianIlett  7 років тому +1

      I did consider that - tons of soldering though :)

    • @CrayZeApe
      @CrayZeApe 7 років тому

      You could use two pieces of copper strip board back to back (one rotated 90 degrees) to form the matrix, then you just have to solder in the diodes, still lots of soldering though.

    • @JulianIlett
      @JulianIlett  7 років тому +1

      I like the back to back topology, but a real bugger if you want to change the bootstrap code!

    • @electrodeyt3491
      @electrodeyt3491 7 років тому

      Julian Ilett Put It in silicon, just like nintendo does :)

  • @skullkil
    @skullkil 7 років тому +4

    any ideas for reading from a storage device, like paper tape or something?

    • @JulianIlett
      @JulianIlett  7 років тому +1

      Hmm, tricky. But I have bought a small 5v supercapacitor which I'm hoping to use as a battery backup for the RAM chips.

    • @AndersJackson
      @AndersJackson 7 років тому

      Julian Ilett that would be more like a RAM based on small circular magnets.
      But depending on what is put in a device, it could be done quite easy. With some simple coding in your computer.

  • @anvz6
    @anvz6 7 років тому +1

    Not including a program counter is an interesting idea, but I don't see the atvantage on it. Most of the instructions of a program are consecutive, then most of the program address ram will be waste just counting. The only atvantage on it is the jumps are very easy to implement (each instruction has a jump included) but it does not solve the conitional jumps.
    You will need to implement conditional jumps, then, having it done, implementing unconditional jumps should be easy.

    • @JulianIlett
      @JulianIlett  7 років тому

      Conditional jumps by changing a high order address line to switch to 'the other half' of the RAM chip.

    • @anvz6
      @anvz6 7 років тому

      Julian Ilett This is as easy as copying the new address to the PC...

  • @PETIKTV
    @PETIKTV 6 років тому +1

    can you list all of the component, please.... thanks.

  • @DupczacyBawol
    @DupczacyBawol 7 років тому

    btw, if anyone has old PC motherboards or graphics cards you can utilize their EEPROMs or CMOS chips that are often in DIP form and have over 512KB capacity ;)

  • @slap_my_hand
    @slap_my_hand 7 років тому

    I spent the last hours building a computer in logisim based on this concept. I still need to optimise it, but it already completed it's first program.

    • @JulianIlett
      @JulianIlett  7 років тому

      O cool, would love to see it :)

  • @rkline1963
    @rkline1963 7 років тому

    You could also program this as a binary coded decimal counter, where 01001 would have the address for 10000

    • @JulianIlett
      @JulianIlett  7 років тому

      That's true. Could also program it using a Gray code or even a pseudo-random sequence :)

  • @andymouse
    @andymouse 7 років тому

    when I look at this I get a weird optical effect pretty cool

  • @sukantasutradhar9217
    @sukantasutradhar9217 3 роки тому +1

    Nice

  • @carlwilson4425
    @carlwilson4425 7 років тому +2

    Just out of curiosity, why not use a 16bit RAM chip, and split that (ex, upper registers for data, lower for addresses)?
    I'm old, old,old school, and piece count also helps...
    While the wiring would be a spaghetti monster, and explanation of the monster would be more difficult, piece count would be lowered.
    Just curious, since you wanted lower component count...

    • @JulianIlett
      @JulianIlett  7 років тому +1

      No reason really. I've already got the 8-bit RAM working with an 8-way DIP switch. Having two separate RAMs is a bit more modular. It'll be a bit easier to identify the various sections of the computer with two RAM chips - I hope :)

    • @Anvilshock
      @Anvilshock 7 років тому

      Ah, I see you answered that one already. I was curious about splitting the chip and retrieving the actual instruction by ANDing one of the higher address lines in the second tick (or interleave counter and instruction on even-odd addresses). Especially since you have an 8-bit output but an 11-bit address range, essentially wasting 3 bit of address range that you'll never be able to address your way while still needing a second 6116.

    • @JulianIlett
      @JulianIlett  7 років тому +3

      Jeff interleaved program instructions and jump addresses in alternate RAM locations, but I felt this was difficult to explain, so I've gone for a simpler arrangement with 2 separate RAM chips.

  • @rossanderson78
    @rossanderson78 6 років тому

    I just started on this build and looking at the data sheet for the 555 it says pin 4 should be taken to vcc to avoid false triggering. Yet you have pin 4 floating. Any particular reason why?

  • @Manabender
    @Manabender 5 років тому

    I'm not sure I get the point of doing what you're doing. It seems like (to make a Rick and Morty joke) you've just designed a program counter with extra steps.
    The 74LS161 chip is a four-bit binary counter, and you can chain two of them together to make an eight-bit counter. And it *does* have the ability to update its state with an arbitrary input, in order to execute jump instructions. And it's still just two chips; I know you expressed a desire to keep the chip count to a minimum.

  • @SzDavidHUN
    @SzDavidHUN 7 років тому

    Why not make an arduino programmer for the computer? Fast program load and save. Maybe you could use an SD card reader to store the program in a txt like file. Or use th internal memory of the arduino. Or dump to serial and read from serial. Once you made your program you could save and reload it in a very short interval. Just connect the data inputs and the manual clock to the board. if there is not enough pin, there is a commonly cheaply avaliable PCF8574 I2C based IO expander. Write a binary value to it, and it outputs it. 8 bit just like your computer. Either in DIP or SMD or module type :)

  • @joruss
    @joruss 7 років тому

    While ingenious, my heart bleeds seeing whole ram chip "wasted" on just jump map. Detect one op-code (for 0xff simple 8 diodes detector would do nicely), store in SR latch (be it on transistors or logic gates) and load next value into PC (and reset latch). With ttl 74867 or two cmos 4516 this can be easily done and results in much less complicated programming and construction much closer to existing systems.

    • @JulianIlett
      @JulianIlett  7 років тому +2

      It's a bit wasteful, I admit. I could interleave program jump addresses and CPU instructions, but it would make it much more difficult to explain how it works. The RAM chips are $1 each.

  • @taranagnew436
    @taranagnew436 4 роки тому

    what are the display's your using?

  • @bassbatterer
    @bassbatterer 7 років тому

    Doesn't this make is a Harvard architecture machine rather than a vonn Neuman architecture as it requires seperate memory more Instructions and Data?

  • @Anvilshock
    @Anvilshock 7 років тому

    Julian, how do you get the RAM to accept the IO lines as High when you pull Write Enable to ground? I've replicated your setup and when I pull WE to ground, I am writing all zeros. I have to force the IO high to actually accept it. Is that a peculiarity of your Toshiba 2016 vs, say, an ST M6116LN?

    • @JulianIlett
      @JulianIlett  7 років тому

      My DIP switch has both pull-up and pull-down resistor SIL packs connected to it. 47k on the top side of the switch to Vcc and 4k7 below the switch connected to Gnd. The DIP switch is upside down (on is down).

  • @followthetrawler
    @followthetrawler 7 років тому

    I was thinking about the instruction side of this Julian - do you really need a second switch to programme the ram, couldnt you use the same one that is programming the location?

    • @JulianIlett
      @JulianIlett  7 років тому

      Yes, by interleaving jump addresses and program instructions - but it's difficult to see what's going on.

  • @hernancoronel
    @hernancoronel 7 років тому

    Julián write an arduino program that would write the ram directly with all the numbers up to 255. It'd be the ultimate hack!

    • @JulianIlett
      @JulianIlett  7 років тому +2

      Going further, an assembler could be written which generates object code from source code and works out all the jump addresses too :)

  • @peterfielden-weston7560
    @peterfielden-weston7560 7 років тому

    Um... How are you going to do conditional jumps, or are they beyond the scope of this device?

  • @DanTup
    @DanTup 5 років тому

    What are the little red/blue light/LED modules on here? I tried searching but can't find anything like them (not entirely sure what to search for though :-))

    • @DanTup
      @DanTup 5 років тому

      Aha, found some :)
      thepihut.com/products/adafruit-10-segment-light-bar-graph-led-display-pure-green-kwl-r1025pgb

  • @paulgrimshaw6301
    @paulgrimshaw6301 7 років тому

    Neat - yes, why bother with a program counter and extra logic for a jump instruction when you can just include the 8-bit address of the next instruction within each 16-bit instruction. How are you going to handle data though, other than immediate values? A third RAM chip with a 4 bit address driven by 4 of the remaining 8 bits in your instructions perhaps? More generally do you have an overall design in mind?

    • @JulianIlett
      @JulianIlett  7 років тому

      The computer already has a 1-byte data memory. OK, it's not much, I admit.

  • @ketandesai5326
    @ketandesai5326 7 років тому

    To avoid having to program your counter manually could you use 2 counters?

  • @kyoudaiken
    @kyoudaiken 7 років тому

    Really interesting stuff.
    But the sound in the parts recorded with the phone is awful, the highs are so harsh and biting and it sounds like compressed with 56kbps mp3. The part recorded with the computer is much better and less harsh.

    • @JulianIlett
      @JulianIlett  7 років тому

      It's possible that's because I'm using a different video editor. UA-cam have decided (in their infinite wisdom) to scrap the UA-cam Video Editor. I reckon the YT Editor did some clever stuff with audio level balancing. Needless to say I'm not very happy :(

  • @zachburke8906
    @zachburke8906 6 років тому

    Where do I get that led display?

  • @tablatronix
    @tablatronix 7 років тому +2

    you might want to buy an automatic stripper or gun stripper , your gonna have alot of wires

    • @JulianIlett
      @JulianIlett  7 років тому

      I've got a Weicon Wire Stripper No. 5 which appears now and then :)

    • @Anvilshock
      @Anvilshock 7 років тому +1

      hyperboleandahalf.blogspot.de/2010/04/alot-is-better-than-you-at-everything.html

    • @JulianIlett
      @JulianIlett  7 років тому +1

      I share you pain ;)

    • @GRBtutorials
      @GRBtutorials 6 років тому

      Actually, my automatic stripper is no good for this thin wires. There are some that can strip these 28 AWG (I think) wires.

  • @Billismyfakename
    @Billismyfakename 7 років тому

    Good video. I wonder how hard or useful it would be to implement a skip next address if a flag is set or clear, like the pic BTFSS instruction?

    • @JulianIlett
      @JulianIlett  7 років тому

      Useful definitely, but it would need a hardware adder to increment the program counter (or a method of producing a double count), so maybe a bit tricky.

    • @Billismyfakename
      @Billismyfakename 7 років тому

      Since you have to enter the addresses by hand, maybe you could just use the even number addresses and tie the flag register gated by an instruction decoder to address line 0. Probably some gotchas that I haven't thought about though.

    • @JulianIlett
      @JulianIlett  7 років тому +1

      That's pretty much what Jeff did. I'll probably connect my flag bit to one (or more) of the higher order address bits.

  • @Spongman
    @Spongman 7 років тому

    ok, so now you can re-order your instructions arbitrarily, and you have to use self-modifying code for conditionals. i still think making the PC an addressable counter/latch peripheral would be simpler.

    • @JulianIlett
      @JulianIlett  7 років тому

      I've got a plan for conditionals with self-modifying code... I think

    • @JulianIlett
      @JulianIlett  7 років тому

      I meant WITHOUT self-modifying code!

  • @granumuse7847
    @granumuse7847 5 років тому

    Wow!

  • @blainethepilot
    @blainethepilot 7 років тому

    I'm gonna build one of these

  • @June18887
    @June18887 7 років тому

    What RAM so you use? Do you have a part number for me?

    • @JockMurphy
      @JockMurphy 7 років тому

      He had been using a Toshiba TMM2016ap-10 (IIRC) 2Kx8 Static RAM. In this latest video he seems to have switched to a different chip

  • @Spector_NS5_RD
    @Spector_NS5_RD 7 років тому

    Rehot CPU, Bro. 100% fix

  • @TheAscBroth
    @TheAscBroth 7 років тому

    But what can you do with it? Can someone tell me :D?

    • @JulianIlett
      @JulianIlett  7 років тому +4

      Probably something really simple, like calculating fibonacci numbers.

    • @TheAscBroth
      @TheAscBroth 7 років тому

      Ahh so nothing really big?

  • @shdgfhjkdjjksiajs3314
    @shdgfhjkdjjksiajs3314 7 років тому

    Mr. Ilett, I really like your videos and especially this project, but this is the most stupid solution for program counter I've ever seen :D What you actually need is parallel output counter but with load / set function, so you can set any starting number and let it count. This is important for branching. There is no point of needing RAM for PC. You need something like TI SN74AS867.

  • @chazM6116
    @chazM6116 7 років тому

    Julian Ilett do you not read your messages? as I asked you a question and no reply

    • @JulianIlett
      @JulianIlett  7 років тому

      I do read all my messages - it's just not possible to answer all of them.

    • @chazM6116
      @chazM6116 7 років тому

      shame I will have to work hard to find the answer then :(

  • @SodAlmighty
    @SodAlmighty 7 років тому

    I fail to see the point of this modification. You've essentially created a computer with an instruction set consisting of a single instruction - i.e. JMP. This is [a] worthless because it is unable to do any other work, [b] a pain in the arse to program, and [c] utterly redundant as you are simply simulating the counter you already had.

  • @pev_
    @pev_ 7 років тому

    Did you ever state your goals for making this computer? I mean you can surely build a million different implementations of a simple breadboard computer, but why are you making it this way particularly? I'm sorry to say this but it looks like you are going ass-upwards on a tree, i.e. you seem to be fiddling with this and that, but not really knowing what you want to do. Just as an example I suggest to take a look at Ben Eater's videos about an 8-bit breadboard computer. Sure it takes a lot more breadboard space than yours does (at least at this moment), but it is so clear what each part of it does. I'm sorry if I have missed your motives for this, but you have always made excellent videos and this computer of yours just seems a bit hit and miss for me.

    • @JulianIlett
      @JulianIlett  7 років тому +4

      It's completely hit and miss at the moment. I could have designed this whole thing off camera, then presented it as a fully finished, highly polished project. I've chosen to show the whole design process (with all its rethinks, changes of direction and uncertainties) on video for everyone to see. Ben Eater is my primary inspiration for this project, but his computer was a fully finished design when he started making his video series.

    • @Dennis-mq6or
      @Dennis-mq6or 7 років тому

      That's the BEST feature of this presentation!

  • @nickpelov
    @nickpelov 7 років тому

    Sounds like Microsoft put more RAM so we can fill it with bullshit and you still won't have enough RAM. Why would you replace simple counter with complex RAM that has to be programmed. Just make a jump instruction and jump once at the end of the loop. BTW one counter is less parts than RAM+latch and it's cheaper

  • @himselfe
    @himselfe 7 років тому

    Ergh, the inelegance! Complete waste of an entire ram chip for it to just hold program counter addresses when the vast majority of them will just be increments rather than jumps. Much better to use a register based system.

  • @geralteld1332
    @geralteld1332 7 років тому

    *rubbish