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![youtube=]

36 thoughts on “Programming The 6502 One Nibble At A Time

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

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

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

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

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

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

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

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

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

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

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

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

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.