Silicon observatory / No. 009

Inside the 6502.

The $25 processor, one clock cycle at a time, on a KIM-1-style board. Each cycle reads or writes the bus, and that includes the dummy reads and the double writes.

1975INTRODUCED
8 bitDATA WIDTH
1 MHzCLOCK
3,510TRANSISTORS
READY

02 / The board

KIM-1 style · 1 KB RAM · two 6530s
Six digits share segment lines a–g on 6530-002 PA0–PA6. PB1–PB4 drive a 74145 decoder that lights one digit at a time. They hold nothing: a program has to keep scanning them. Paused or at a slow clock you see only the digit lit at that instant.
6530-003 port A, $1700. Eight LEDs added to the application connector. A stock KIM-1 has bare pins here.
Hex keys and AD DA + GO PC are scanned by the monitor. ST pulls NMI, RS pulls RES, and SST pulls NMI on every opcode fetch outside the ROM.

03 / Logic analyser

Newest cycle on the right · click one to read it

05 / Block diagram

MOS 6502 · not to scale
INSTRUCTION REG$00BRK TIMING GENERATOR DECODE ROM · 130 LINES—opcode + T-state in, control lines out RANDOM CONTROL LOGIC · INTERRUPTSIRQNMIRESDUE X$00 Y$00 STACK PTR$FD ALU A$00 P$24 PC$0000 ADDRESS BUS A15–A0$0000from PC ADDRESS LATCH$0000 DATA LATCH$00 DATA BUS D7–D0$00in R/W HIGH: READSYNCφ0 IN · φ1 φ2 OUT · RDY · SO
CYCLES0
INSTRUCTIONS0
CYCLES / INSTR—
TIME AT 1 MHz0 µs

06 / Memory

$02

08 / The instruction set

09 / What it got right, and what it got wrong

Measured against the 8080 and the 6800

What it got right

What it got wrong