Building a 6502 NOP Test

 The Simplest Working 8-bit CPU Circuit

Before we start building a full retro console, let’s do something beautifully simple get a 6502 CPU to run, no RAM, no ROM, no glue logic, just the chip, a few LEDs, and a clock.

This is called a NOP test (No Operation).
It’s the digital equivalent of “does it breathe?”

What You’ll Need

PartPurpose
MOS 6502 CPUThe heart of our system
Bench power supply (5 V)Power for the CPU
Function generatorClock source
8 × LEDsTo watch address lines change
8 × 470 Ω resistorsCurrent-limiters for the LEDs
1 × 0.1 µF capacitorDecoupling between VCC and GND
Breadboard and jumper wiresFor connections

MOS 6502 Cpu Pin Out

Check your IC and its datasheet to ensure that you have the correct pin out map as the steps below may vary slightly.

Step 1 — Power and Decoupling

Give the 6502 a clean 5 V supply:

  • VCC (pin 8) → +5 V

  • VSS (pins 1 and 21) → Ground

  • Place the 0.1 µF capacitor between VCC and VSS close to the chip.

That tiny capacitor smooths out voltage spikes when the CPU switches, without it the chip may behave erratically.

Step 2 — Clock Signal

The 6502 needs a continuous square-wave clock to drive its internal timing.

  • Connect your function generator output (5 V p-p, square wave, ~50 kHz) to Φ0 IN (pin 37).

  • Leave Φ2 OUT (pin 39) unconnected for now, or you can monitor it with a scope later.

You can try slower speeds (1 Hz – 10 kHz) if you want to see the LEDs step, or go faster for a lively flicker.

Step 3 — Essential Tie-offs

To keep the CPU stable, tie a few control pins so it doesn’t wait for missing hardware:


Use 10 k Ω pull-ups or just link directly to +5 V for this simple test.

Step 4 — The NOP

With nothing on the data bus, the 6502 will effectively read random values. 

Therefore we need to know the instruction code for the 6502 which is: -

Hex: EA
Decimal: 234
Binary: 1110 1010

Let’s label each bit (D7 = most significant bit, D0 = least):


Therefore we need to connect the following data lines to +5V rail: -

Pin 26 D7 to +5V

Pin 27 D6 to +5V

Pin 28 D5 to +5V

Pin 30 D3 to +5V

Pin 32 D1 to +5V

The following data line need to go to GND: 9

Pin 29 D4 to GND

Pin 31 D2 to GND

Pin 33 D0 to GND

Step 5 — Watching It Work

Now for the fun part visual proof.

  • Connect A0 – A7 (pins 9 – 16) each to anode of the LED 

  • Ground the LED cathodes through a 470 Ω resistor

Start the function generator and power up the bench power supply
You’ll see the LEDs flashing in what looks like a binary counter, each NOP increments the Program Counter by 1.

What’s Happening

  1. The CPU resets and reads the (non-existent) reset vector.

  2. With nothing driving the bus, it sees $EA ($11101010) — a NOP.

  3. Each NOP takes 2 clock cycles and simply increases the Program Counter.

  4. Address lines A0–A7 show the lower 8 bits of that counter counting upward continuously.

Even at 50 kHz, you’ll see a fast blur or flicker, proof your 6502 is alive and clocking.

Try These Next

  • Slow the clock to a few Hz to watch the binary pattern crawl by.

  • Move the LEDs to A8–A15 to see higher bits toggle slower.

  • Add an LED to SYNC (pin 7) — it pulses once every instruction fetch.

Results

You’ve just built the smallest working 6502 circuit, no ROM, no RAM, no anything.

The flashing LEDs prove it’s executing instructions and advancing through memory.
That’s the first step to making your own custom retro console.



Comments

Popular posts from this blog

Math Behind Logic Gates

6502 - Part 2 Reset and Clock Circuit