6502 CPU and variants

Pinout

  Vss 1 --6502-- 40 !rst <--
--> rdy 2 39 clk2 -->
<-- clk1 3 38 !so  
--> !irq 4 37 clk0 <--
  nc 5 36 nc  
--> !nmi 6 35 nc  
--> sync 7 34 r/!w -->
  Vcc 8 33 d0 <->
<-- a0 9 32 d1 <->
<-- a1 10 31 d2 <->
<-- a2 11 30 d3 <->
<-- a3 12 29 d4 <->
<-- a4 13 28 d5 <->
<-- a5 14 27 d6 <->
<-- a6 15 26 d7 <->
<-- a7 16 25 a15 -->
<-- a8 17 24 a14 -->
<-- a9 18 23 a13 -->
<-- a10 19 22 a12 -->
<-- a11 20 21 Vss  
 

Variants:

Pin 6502
R6C502
G65SC02
Atari
Sally
R65C102 R65C112 W65C02S W65C816S
1 Vss Vss Vss Vss vpb vpb
3 Ø1(OUT) Ø1(OUT) Ø4(OUT) nc phi1o abort
5 nc nc mlb mlb mlb mlb
7 sync sync sync sync sync vpa
34 r/!w nc r/!w r/!w r/!w r/!w
35 nc !halt xtlo nc nc e
36 nc r/w BE BE BE BE
37 ØO(IN) ØO(IN) xtli Ø2(IN) Ø2(IN) Ø2(IN)
38 !so !so !so !so !so mx
39 Ø2(OUT) Ø2(OUT) Ø2(OUT) nc Ø2(OUT) vda

Signals

VPB is Vector Pull (output) pin goes low when an interrupt vector is on the address bus.
VPA is Valid Program Address
VDA is Valid Data Address

MLB = Memory Lock (output) pin goes low during specific cycles of a read-modify-write instruction to indicate when memory should not be accessed.

BE = Bus Enable (input) When Bus Enable goes low this forces the Address bus, Data bus and R/!W to a high impedance state.  This pin requires a pull-up resistor to VDD.

XTLI, XTL0 = Crystal input and output respectively. RC65102 only.
Ø4 = Output Clock is 90 degrees out of phase with CLK0 in. RC65102 only.

Western Design Centre W65C00 family

These are modern clones that are available as soft-IP or hard-ASIC chips.
If you want data sheets that are not the huge scanned images of ancient paper data sheets, this is the best place to look. They have a comprehensive comparison of various 6502 chips, which I'm not going to duplicate here.

Western Design 65C02S

Pinout compatible with original 6502, except that pin 1 is no longer 0V, but the output = VPB = Vector Pull. Pin 36 must also be high to enable the bus buffers. This can be done with a pull-up resistor.

Western Design W65C134S (W65C02S based microcontroller)

Has 4Kbyte ROM at $4000 up, 192 bytes RAM (appearing in the top of pages 0 and 1), two 16 bit timers, a low power Serial Interface Bus (SIB) configured as a token passing Local Area Network, Universal Asynchronous Receiver and Transmitter (UART) with baud rate timer, one 16-bit "Monitor Watch-Dog Timer" with "restart" interrupt, twenty-two priority encoded interrupts, ICE Interface, Real-Time clock features, Bus Control Register (BCR) for external memory bus control, interface circuitry for peripheral devices, and many low power features. Packaged in 68 Lead Chip Carrier.

Western Design W65C816S (16-bit variant of the W65C02S)

Western Design W65C265S (W65C816S based microcontroller)

Produced in 84-pin Leaded Chip Carrier or 100-pin QFP.

Rockwell R65C00 family

Clock can be stopped at high level indefinitely for standby mode. For low level, 5us max.
12 new instructions (68 total).
59 new opcodes (210 total).
2 new addressing modes.

The Rockwell data sheet (Rev. 3, October 1984) has many contradictions.
Where this is so, I have followed the pinout diagrams, which seem to make the most sense.
Rockwell licensed the 65C02 design from Western Design Centre, and used it in their modem chip sets that became the main business. They changed their name to Conexant, and their website makes no mention of 65C02 chips so I assume they are no longer sell them

Rockwell R65C02 (Pinout compatible with original 6502)

Rockwell R65C102 (4xCLK2 on-chip crystal oscillator)

Rockwell R65C112 (Slave processor)

GTE 65SC02

This has a larger instruction set than other 65C02 chips.
I cannot find any company called GTE, though there was one that merged with Bell Atlantic to form Verizon. They seem to be telcoms only, no trace of the 6502 there.

Atari 'Sally'

This is no longer manufactured, but can be bought from Best Electronics in the USA. The W65C02S or R65C102 might be the nearest replacements because the Sally !HALT signal could be implemented by holding the clock high and pulling BE low. The R65C102 has some pinout differences with the Sally.

I do not know if the 8-bit Atari machines stop the CPU clock while !HALT is asserted, or if !HALT stops the clock having any effect on the Sally CPU.

Mitsubishi 740 series microcontrollers

These have a 6502 based core, with many integrated peripherals. The address lines are entirely internal, pins are used for I/O ports. The 740 Software Manual contains a full description of the instruction set, which is a superset of the original 6502. There are many variants and families, each with their own combinations of peripherals. Consult the relevant User's Manual for details. For example, the 3803/3804 family User’s Manual shows the special function registers occupy 0000-003F, and 0FF0 to 0FFF.

SGS Thomson ST7 series microcontrollers

These are based either on the 6800 or 6502, with many integrated peripherals mapped in page zero. The address lines are entirely internal, pins are used for I/O ports. The ST7 stores 16-bit pointers with the most significant byte at the lowest address, the opposite to normal 6502 convention.


Information checked against Rockwell data sheet and Atari information.

http://oxyron.net/graham/opcodes.html has details of the 6502 instruction set and its variants.

www.6502.org is a centre for 6502 enthusiasts.


Development tools

CC65: a 6502 C Cross-Compiler, Assembler and Linker, you can download from funet.
This creates executable files specific to the file I/O system of the target machine, which can be one of several 'vintage' 6502 home computers.
It is not currently oriented to producing ROM images for new embedded 6502 systems.