Page 1 of 1

Simplest possible computer?

Posted: Thu Jul 03, 2025 10:49 am
by LeighAH
Hi all, newbie here. Thought I might share this project I've been working on.

Many years ago I studied Electronic Engineering in college, but then I got a job as a software developer and never touched electronics again. It's been nearly 20 years, but lately I decided I wanted to fiddle with hardware again.

I decided I wanted to build the simplest computer I could think of using a 6502. Just something that could execute code and allow me to get a good hands-on insight into how the chip worked and how to wire it up etc. I know there are a lot of resources both here and elsewhere on the internet, but I wanted to work purely off data sheets rather than following someone else's path as I felt that would force me to learn the most as I went.

I succeeded in creating a circuit that will run a program from ROM and display the contents of the address and data busses on LEDs. I'm looking forward to building on this further by adding RAM, some sort of input method, and perhaps an I2C LCD for output.
I am using a W65C02 with 8k ROM in the form of an AT28C64. The clock is provided by a simple 555 circuit.

Below is the schematic, which is probably riddled with fundamental errors and I'd definitely be open to and interested in feedback in that regard. I have it running at about 1Hz so that it's possible to watch and understand everything that the chip is doing via the LEDs.
6502_ROM.png
6502_LED_Driver.png
And below is a short video of it running a simple program. When the read LED goes off, the data bus will show a single bit lit, which shifts up the bus and then loops.

Code: Select all

	   .ORG $100;
START: LDA #01;
	    STA $0200;
LOOP:  ASL;
	    STA $0200;
	    CMP #$80;
	    BEQ START;
	    JMP LOOP;
6502 in action!

Re: Simplest possible computer?

Posted: Thu Jul 03, 2025 11:58 am
by BigEd
Welcome! I do like to see blinking LEDs.

Re: Simplest possible computer?

Posted: Thu Jul 03, 2025 3:06 pm
by BigDumbDinosaur
Welcome to 6502 land.  As Ed says, some blinkenlights are always good.  :D  I’ve been around computers long enough to recall when there were seemingly dozens of blinkenlights on the front panel above the console.  When they all froze...  :evil:

Note for future reference that the 555 timer is not a good choice for clock generation.  WDC specifies that the output transition time of the clock generator should not exceed 5 nanoseconds (the tF and tR specs on page 25 of the data sheet—see the timing diagram on the following page for where those numbers apply) and that the Ø2 input (pin 37 if PDIP) on the 65C02 must be driven to CMOS levels in both directions.  While there is some room to fudge with the clock signal, especially at low single-digit rates, the 555 timer cannot meet the rise/fall rate specified by WDC.

Also, you’ve left the MPU’s SOB input floating.  As a general rule, the inputs to CMOS devices should never be allowed to float, unless the data sheet indicates that it’s okay to do so.  SOB needs to be terminated, either to ground or, preferably, to VCC.

Have fun and keep us posted on your progress.

Re: Simplest possible computer?

Posted: Thu Jul 03, 2025 4:07 pm
by LeighAH
Thanks a lot for the feedback. I didn't even realise the SOB pin was an input - how did that get by me? I will be sure to tie it to Vcc.

I couldn't think of another way to get such a slow clock rate apart from using a 555. It seems to be working, but I'm definitely open to other options - any suggestions?

I have crystal oscillators on order for when I want to run it faster, but they're taking their sweet time to get here. :?

Re: Simplest possible computer?

Posted: Thu Jul 03, 2025 6:08 pm
by gilhad
I would use Arduino Nano, as it is cheap, could be put in breadboard and it is simple to generate clock with any speed up to megahertz and downto hours :)
Also it is easy to change the frequency, or switch it to manual pulses or whatever else :)
Well, not much 6502 style, but cheap and easy.

Re: Simplest possible computer?

Posted: Thu Jul 03, 2025 7:32 pm
by GARTHWILSON
Welcome.  Please see the 6502 primer, indexed at http://wilsonminesco.com/6502primer/ .  It will lead you to understand and build the simplest useful 6502 computer, simpler yet more useful than Grant Searle's, and this primer seems to be where Ben Eater got some of his ideas.  The clock-generation page there even has a circuit that's simpler than your 555 circuit, and you can make it as slow as you want, even eliminating an IC because you already have an inverter IC there and you can make it a Schmitt-trigger type (74xC14 instead of '04) and use another section of the same IC for it.

Re: Simplest possible computer?

Posted: Thu Jul 03, 2025 8:03 pm
by BigDumbDinosaur
LeighAH wrote:
I couldn't think of another way to get such a slow clock rate apart from using a 555. It seems to be working, but I'm definitely open to other options - any suggestions?

A strange but practical way to get an ultra-slow clock is with a comparator oscillator, with its output fed through a 74AC14 Schmitt inverter.  You can run a comparator oscillator at single-digit speeds, e.g., 5 Hz (or slower), and with near-perfect symmetry.  The 74AC14 sharpens the clock and easily meets the 5ns rise/fall spec.  I posted about it several years ago.  Also, look here for more info.

Re: Simplest possible computer?

Posted: Thu Jul 03, 2025 8:51 pm
by drogon
How simple do you want?

Also, how usable do you want it?

I think there is a link...

I did a "minimal" system a while back - started on breadboard and took it to PCB. It has a 6507, EEPROM (4K), RAM (4K), A latch IC and a GAL for the glue to save 3 ICs for decoding. There is a 2Mhz can oscillator and an optional VIA... So 5 ICs, the oscillator and a 6th for the VIA. (It also has a single input button too, and TTL serial done in software)

It has blinkenlights too! Also programmable in TinyBasic.

there is a link to it here: viewtopic.php?f=6&t=8262

Don't be afraid to crank up the breadboard speed if you want. Mine ran just fine at 2Mhz and others have gone much higher on breadboard.

Keep us posted with progress.

-Gordon

Re: Simplest possible computer?

Posted: Thu Jul 03, 2025 10:45 pm
by plasmo
Another simple 6502 computer is one without glue logic. So it consists of 6502, RAM, ROM, I/O (6551), clock, and reset. viewtopic.php?f=4&t=6455&start=15
Bill

Re: Simplest possible computer?

Posted: Fri Jul 18, 2025 9:25 am
by LeighAH
Thanks for the feedback folks. I have taken some of the advice on board and added a proper clock generator. I also added 8kB of RAM, which I had on hand.
6502PrototypeRev2.PNG
I have since bought some 32kB RAM chips which I will play with next.

In the meantime, I turned my original design into a PCB which arrived this week. I assembled it and it worked first time, and it was extremely satisfying!
20250718_101909.jpg

Re: Simplest possible computer?

Posted: Fri Jul 18, 2025 10:02 am
by drogon
Very nice!

-Gordon

Re: Simplest possible computer?

Posted: Fri Jul 18, 2025 1:42 pm
by Michael
Congrats'. That PCB turned out very nice. You might experience problems if you don't qualify RAM access with the PHI2 clock. Here's one way it might be accomplished with your 8K RAM chip by taking advantage of the active high chip select input in a slightly different manner;

Re: Simplest possible computer?

Posted: Fri Jul 18, 2025 2:01 pm
by Dr Jefyll
LeighAH wrote:
it worked first time, and it was extremely satisfying!
Congrats on your progress with this! I'm glad you got to experience some well-earned satisfaction. But Michael is right about the need to qualify RAM access with PHI2 (and the solution he proposes is quite apt).

Until the problem is corrected, what you have is a latent fault that has potential drive you crazy :!: by manifesting at unpredictable times and in misleading ways. (Think: days of fruitless troubleshooting. :cry: )

Congrats again, but this important topic is one of many mentioned in Garth's primer. Recommended reading!

-- Jeff

Re: Simplest possible computer?

Posted: Mon Jul 21, 2025 7:26 am
by Michael
You mentioned getting a 32K RAM chip. These only have a single active-low chip select input so you'll need some logic to qualify either the chip select input or the Read/Write inputs with the clock. As Jeff mentioned, please check out The Primer for valuable info'. I've included an untested example (below) that produces clock qualified read and write signals.

Have fun... Cheerful regards, Mike
Forum SBC 1.png
I have used a $2 Arduino Nano clone on some projects to provide a reset signal and a crystal controlled 1, 2, 4, or 8 MHz clock. It wouldn't be too difficult to produce a low speed variable clock and the Nano also fits handily on a solderless breadboard.
BE6502-RE Proto Build (b).png
BE6502-RE on BB ZIF.png

Re: Simplest possible computer?

Posted: Mon Jul 21, 2025 9:16 am
by LeighAH
I have spent some time over the weekend reading through the primer and it is truly an excellent resource. I can see the issue with the RAM timing and I will adjust my circuit accordingly. I'll try breadboarding it out with all the changes I've made. I'm having a lot of fun with this!