• rehsd

6502 SPI Expansion Card

I'm finding SPI to be a nice way to connect my 6502 to additional devices, especially Arduino microcontrollers. Arduino microcontrollers can then easily connect to countless other peripherals. I posted earlier about my SPI setup, which uses shift registers outside of the VIA (which you may or may not like).


I figure that SPI will be a permanent fixture in my 6502 setup, so a PCB seems fitting. Below is an SPI expansion card I am building. It's fairly straightforward. It connects to two VIAs (using three ports) and power. It then provides SPI device selection (through the OEB line) for seven devices -- three onboard Arduino Nano microcontrollers and four external SPI devices.

  • SPI0B: Reserved as a toggle to turn off all SPI devices (E1B on the 74HC138 could also accomplish this, but that would take an additional VIA connection)

  • SPI1B: Available

  • SPI2B: Nano1

  • SPI3B: Nano2

  • SPI4B: Nano3

  • SPI5B: Available

  • SPI6B: Available

  • SPI7B: Available

The unused pins on Port A from the second VIA could control OEB for an additional six SPI devices. With no additional hardware this SPI card can control three Nano microcontrollers and ten additional SPI devices. These VIA pins could also control additional 74HC138 decoders to increase the number of controllable SPI devices. I really hope I don't need more than ten SPI devices. :) And, of course, the three Nano microcontrollers can use I2C to further extend the reach of the 6502.


I wonder, too, if the three Nanos could be used to distribute heavy processing tasks. The 6502 could delegate processing to the Nanos via SPI. Hmmm....


Based on the current design, the cost of the unpopulated PCB is approximately $9 USD (four layer PCB with inner VCC and GND planes).

SPI Card Schematic
Schematic
PCB Front
PCB Front
PCB Back
PCB Back




68 views0 comments

Recent Posts

See All