Troubleshoot the 6502 Processor on Your Atari 8-Bit Computer Circuit Board Using an Oscilloscope (15-30 mins)

Task: Troubleshoot the 6502 Processor on Your Atari 8-Bit Computer Circuit Board Using an Oscilloscope

Needed: Atari 8-bit computer, oscilloscope

Time: 15-30 minutes

Introduction

Nothing is more frustrating than a beloved Atari 8-bit computer that isn’t booting properly into Memo Pad on the 400/800 or BASIC on the XLs and XEs. The 6502 processor (aka Sally) is a great place to start your investigation after preliminary inspections of the board and voltage testing. The goal is to make sure the 6502 is sending and receiving appropriate signals to and from the other ICs on the board. Bad signals can indicate the 6502 itself is bad or one or more chips it interacts with are bad.

I provide below photos and short videos of what the oscilloscope waveforms should look like for each of the 40 pins on a working 6502 Sally from an 800XL. Note that I am using an edge trigger and an Eres acquisition filter on my Siglent SDS 1104X-E oscilloscope to reduce noise and make the signal look a lot cleaner. The key is that the pins have activity that roughly matches (even if much noisier depending on your oscilloscope settings) the patterns below. A nonfunctioning 6502 will have a lack of signal on a pin or a signal that isn’t reaching close to 5 volts, for example.

Circuit Board for Atari 800XL With 6502 Processor Identified
Circuit Board for Atari 800XL With 6502 Processor Identified

Instructions

Step one is to study the pins of the 6502 and what each one does. A nice pinout of the 6502 Sally version used on the XL and XE computers with some descriptions can be found here. I have also included it below. Note that the 400/800 computers use a generic 6502. Wikipedia provides a nice pinout for this 6502. Note that it is missing the HALT pin 35 found on the Sally below. Note that I place the ground clip from the oscilloscope probe in one of the holes of the silver ground rail that circles the circuit board.

Pins on the Atari 6502 Processor
Pins on the Atari 6502 Processor

Step two is to check pins 2, 4, 8, and 40 to make sure they have a constant high reading of around 5 volts as shown in this video and the image below. Pin 8 is the Vcc 5V power in line and could be checked with a multimeter prior to probing with the scope. Pin 2 when high at 5V indicates the CPU is READY for work. If low, the CPU will halt.

High Constant Waveform of Close to 5V Image
High Constant Waveform of Close to 5V for Atari 6502 Pins 2, 4, 8, and 40

Step three is to check pins 1, 5, 21, 34, and 38 to make sure they have a constant low reading of around 0 volts as shown in this video and the image below. Pins 1 and 21 are Vss ground lines.

Low Constant Waveform of Close to 0V Image
Low Constant Waveform of Close to 0V for Atari 6502 Pins 1, 5, 21, 34, and 38

Step four is to check pins 3, 37, and 39 to make sure they have a repeating pattern alternating between 0V and 5V as shown in this video and the image below. This is the clock signal that should be close to 1.79 MHz as shown in the top right of the oscilloscope screen in the video and image. The crystal clock sets the cadence, or drumbeat, for the whole system and is the speed at which the 6502 can execute instructions. Note this signal is for an NTSC (e.g. North American) Atari while PAL (e.g. Europe) runs slightly slower at about 1.77 MHz.

Regular Repeating Waveform Representing the Clock Signal Cycling at 1.79 MHz Image
Regular Repeating Waveform Representing the Clock Signal Cycling at 1.79 MHz for Atari 6502 Pins 3, 37, and 39

Step five is to check NMI pin to make sure it has a stable repeating waveform alternating between 0V and 5V as shown in this video and the image below. You will need to adjust the horizontal frequency scale to see the other repeating signals (not shown here). Note this is the non-maskable interrupt or NMI pin that interrupts whatever software is running because of a fault or error. This can also get triggered during a Vertical Blank or Display List Interrupt.

A Stable Repeating Waveform
A Stable Repeating Waveform for Atari 6502 NMI Pin 6

Step six is to check SYNC pin to make sure it has variable waveforms alternating between 0V and 5V as shown in this video and the image below. When this pin is high at 5V it means that the CPU is getting an opcode to execute.

Variable Waveform for Pin 7
Variable Waveform for Atari 6502 SYNC Pin 7

Step seven is to check address bus pins 9-20 and 22-25 to make sure they have highly variable waveforms alternating between 0V and 5V as shown in this video and the image below. Note that the 6502 uses 16 bits to address up to 64K of RAM. That is why there are 16 pins.

Rapidly Changing Waveforms for the Address Lines Image
Rapidly Changing Waveforms for the Atari 6502 Address Bus Pins 9-20 and 22-25

Step eight is to check data bus pins 26-33 to make sure they have highly variable waveforms alternating between 0V and 5V as shown in this video and the image below. Note there are eight pins allowing the 6502 to send an 8-bit byte of data (i.e. eight 1s and 0s) to RAM at the 16-bit memory address defined by the address line. This byte could define a number to be remembered by a program or bits in a sprite used in player-missile graphics. Invoking the POKE command in BASIC would trigger the 6502 to send a byte of data to the desired memory address.

Rapidly Changing Waveforms for the Data Bus
Rapidly Changing Waveforms for the Atari 6502 Data Bus Pins 26-33

Step nine is to check HALT pin 35 to make sure it has a variable waveform alternating between 0V and 5V as shown in this video and the image below. Note that you can skip this one on the 400/800 as it is missing and the pin not used (i.e. should have low 0V reading like pins 1, 5, 21, 34, and 38).

Variable Waveform for Halt Pin 35
Variable Waveform for the Atari 6502 Halt Pin 35

Step ten is to check Read-Write pin 36 to make sure it has a variable waveform alternating between 0V and 5V as shown in this video and the image below. Note that this pin specifies whether the 6502 is reading data from memory (a high 5V signal) or writing (a low 0V signal). As this waveform oscillates on the scope you can see whether the 6502 is reading and writing in real time.

Variable Waveform for Read-Write Pin 36
Variable Waveform for the Atari 6502 Read-Write Pin 36

Comments

I hope this post is helpful as I did not find many examples online of what all these 6502 pin waveforms are supposed to look like. Deviation from these expected waveforms doesn’t necessarily mean the 6502 is bad. For example, bad RAM chips could prevent the data lines from getting what they need. Any failed chip that communicates with the CPU could be sending bad signals.

Remember that your waveforms might look a lot busier depending on the filter you are you using. I used the Eres filter that smooths these out a lot by sampling the original signal. Below is a photo of the waveform for a data bus line with no filtering. Much noisier!

A Typical Active Data Pin on the Atari 800XL 6502 CPU
Active Data Pin on the Atari 6502 With No Filtering