Programming the 6502 one nibble at a time

[Quinn Dunki] keeps rolling with her 6502 based computer build. This time around she’s added some memory to store the programs, but needed a way to get that code into the device. Above is her solution, a bank of hex switches used to program the 8-bit command and 16-bit address for each line of machine code.

This is a continuation of her Veronica project. The last time we saw it she had hardwired the logic levels for the data bus, but that’s no fun since nothing can actually be computed. [Quinn] picked up an SRAM chip which will store the program. It’s compatible with the 6502’s memory bus, but needs a bit of extra circuitry for her to be able to hand program it with this switch bank. She used some tri-state buffers to switch between connections to the processor, and to the hex switches. This way, she disconnects the RAM from the processor using the buffers, uses the switches and push button to clock in the program, then patches the RAM back into the computer.

Seeing this process in the video after the break certainly gives you an appreciation for what an improvement the punch-card system was over this technique. Still, seeing this is a delight that we’d like to try!


  1. Xeracy says:

    now, that is dedication…

  2. mohonri says:

    Shouldn’t that be “nybble”? You know, nybble:nibble as byte:bite?

  3. Jac Goudsmit says:

    I kinda expected she would put those switches on the data bus only and then feed the CPU one instruction byte at a time. She skipped an ENTIRE step! ;-)

    J/K this is an awesome project; I’ll probably let my stepson (who’s grown up but newly interested in computers) read it to understand more of what goes on under the hood.

    Keep up the good work, Quinn!

  4. Tom the Brat says:

    Wow, that looks harder than “toggling in” a program was!

  5. Troll says:

    Ohh, masochist much? Just attach a flash ROM to the bus already, as well as the RAM and program your test code in the flash using a flash programmer.

  6. Hirudinea says:

    That is the most amazing computer I would never want to program I’ve ever seen.

  7. Andrew says:

    I knew it was just a matter of time before I saw a front panel attached to this project. I’ve got a couple of 1802 based micro-computers which are similar. With the 1802, the program address is incremented each time you add an 8-bit op-code and in it’s most primitive form, instructions are toggles in with a row of 8 toggle switches. Fun stuff!

  8. ScottinNH says:

    This is pretty cool. It’s nice to read about how these platforms are/were built, in HUMAN language.

    It’d be nifty to work along these lines and build a turbocharged Atari 130XE or Commodore 128, etc.

  9. qwerty says:

    Ages ago I joked with friends about an operating system made by a huge wall entirely covered by microswitches (“need an update? Just flip the right ones!”). This isn’t that far from it. Very old school and very informative, and IMO it should be taught to technically oriented kids before their minds are crippled by Java or .NET.

  10. Alex Rossie says:

    Why do women make websites without pictures of their face man.

    • Anonymous Coward says:

      Thank you for attaching your name to your comment, Alex. We all know who to thank for being a tiny part of why women tend to dislike disclosing their genders on the internet.

      To expand upon dext0rb’s comment, if you want to look at photos of women to objectify, look at those who want you to (porn/photo-sharing sites targeted at that). Around any other kind of community *anywhere* please abstain from such behavior. It makes the rest of us look bad. I dont know about you…but I like having women sharing their projects and having positive/comfortable interactions with a community such as this (that is primarily male).

      We do not often see awesome projects from women…this isnt because they are any less able/awesome (as Quinn shows). It is because of people like you and comments like you made.

    • T says:

      Because the red background did not fit her sites design:

    • fred says:

      So hack-a-day has completely given up monitoring the comments I see. :(

      Please give us the ability to upvote and downvote comments. That would help get rid of people like this.

      • T says:

        People are just curious. When we talk to someone on the phone we also would like to see the person on the other side.
        It is not very common to see women working with electronics. So people are just curious about who is behind this nice work. Nothing wrong with that IMHO.

        “That would help get rid of people like this.” Getting rid of curious people..!? I hope not ;)

      • fred says:

        If he was curious about what ALL posters looked like, why did he say this:

        “Why do women make websites without pictures of their face man.”

        He was singling out women who post which makes it more uncomfortable for them, therefore, there is a less chance that they will want to be involved on this site.

        I have learned a lot from reading her blog. It doesn’t matter what she looks like, she is a very intelligent person and I want her to be comfortable with using the site.

      • Bill D says:

        WHY are you using a lowercase ‘C’ for your hex LED display??? That’s just WRONG! *grin*

        Thanks for sharing the coolness factor.

      • Bill D says:

        @Quinn Dunki — Personally, I like and prefer the pseudo-alternate case of ‘AbCdEF’. (the ‘F’ is, of course, a “special case”) You know, near–boy-girl-boy-girl. Perhaps a lowercase ‘c’ is a “girl thing”. Ya think? …. Nah. ;o)

  11. qwerty says:

    Because if they did someone then would ask for pictures of their tits.

  12. salec says:

    I failed to find a detail: how do you make Veronica release the address bus? I see you have three state control of switches to avoid bus contention when computer is running, but that is just a half of the job.

    She could be still driving the address lines even when her clock is stopped. Data sheet says that using RDY …will halt the microprocessor with the output address lines reflecting the current address being fetched.

    If the CPU doesn’t play by the rules then, when you let the buffers on the bus, there’ll still be a clash, levels will be uncertain, etc. Your byte may end up in unexpected RAM location.

    It seems like you should have another set of three-state buffers to cut off the CPU while you are accessing RAM with your loader board.

    • Quinn Dunki says:

      This is an excellent question. The answer is that, while in Program mode, I have a power switch for the entire CPU breadboard that is shut off. You’re exactly right that, strictly speaking, I would need buffers on the CPU address lines. I wanted to see how this idea for data entry worked out before committing to any more complexity. I don’t think this version will make it past the breadboard, though.

  13. kaluce says:

    Do want. I happen to think this is pretty nifty, though I think the first thing I’d have done after getting the chips populated was build in a video display and keyboard module for it. I would hate toggles. :)

  14. Alex Rossie says:

    This is better than the FIGnition though. That is a bitch to type on

  15. HackerK says:

    Wow this is hard core! When I though I manually program a SRAM (using a bank of dip switch) to display (scroll) bitmap on 3x 5×7 LED matrix 20 yrs ago was nuts…

  16. Eddie says:

    Computers still had these long after punched cards were available. How are you going to read punched cards without toggling in the program to read the punched cards first?

    • Bill D says:

      It’s called a bootstrap program, usually in “ROM”, or an old-style version of it, like a diode board, or hardwired or wire-wrap board, although some computers had dead start panels, which did have ‘banks’ of switches and were basically very old style “PROM”. (programmable read only memory)

  17. Josh B says:

    That’s great!!! Amazing :) Brings back memories of when I use to toggle in 100’s of bytes into my COSMAC ELF. BTW, you are correct in saying “nibble”.


  18. JMP1230 says:

    >1230 – a2 00 bd 60 12 6a 6a 6a 6a 9d 70 12 e8 e0 09 f0 03 4c 32 12 a2 00 ad 69 12 9d 79 12 e8 e0 3f d0 f8 4c 30 12

    >1260 – 5b 01 23 01 13 01 d3 13 e3 3f

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,357 other followers