Connecting the 6502

Powering the 6502

The 6502 can be powered from 1.8 to 5V. I will be using 5v, as this will be suitable for other ICs that I will be using. Pin 8 is connected to the positive rail and pin 21 is connected to the negative rail.

RDY

Pin 2 is the ready pin. I will not be using this pin. However, it cannot be left unconnected, so I will connect to the positive rail, via a 3.3KΩ resistor.

IRQB

Pin 4 is IRQB. I will be using this pin but not to begin with. For now I will connect this pin to the positive rail, as it is active low.

NMIB

Pin 6 is NMIB. I will not be using this pin. I will connect it to the positive rail, as it is active low.

BE

Pin 36 is BE. I will not be using this pin. I will connect this pin to the positive rail.

SOB

Pin 38 is SOB. I will not be using this pin. I will connect it to the positive rail, as it is active low.

To begin with, I want to connect the 6502 to a power supply and connect the minimum amount of pins to get it going. I will use an Arduino Mega to read the values that are put out onto the data and address pins.

With power applied the 6502 will be running. There should be data at the data and address bus. It would be good to see this and check that everything is working correctly, I will connect LEDs (with protection resistors) to the buses.

Now we can see that the 6502 is running and that there is data on the data and address bus. However, this data doesn’t mean anything, it would be good to be able to test the 6502 in a known state. A good way of doing this is by using the NOP. NOP stands for No Operation. The NOP causes nothing to happen except for incrementing the program counter. If you look at the datasheet for the 6502, there is a page called OpCode matrix. This contains all of the different OpCodes that the 6502 can do. If you go to the row with E in it and across to the column with A in it, you will see NOP. Therefore, if we were to present EA at the data address, the 6502 should run the NOP. Also, if you look under NOP, you will see an i. The i denotes that a NOP takes to clock cycles to complete.

To make the 6502 run a NOP, we need to place EA on the data bus. EA is hexadecimal and is 11101010 in binary. We can place 11101010 on the data bus by connecting pins that need to see a 0 to ground and those that need to see a 1 to 5v. We can then monitor the 16 address lines. The 6502 running the NOP should cause the program counter to increment each time and the address to increase. I will connect LEDs to the address lines, so that the incrementation can be watched in binary.