Close
0%
0%

SPI Master Peripheral Card for the Apple ][

An Apple ][ peripheral card to control up to four SPI devices without the need for bit banging.

Similar projects worth following

As part of my Spikeputor project, I decided to use an Apple ][ for much of the I/O for retroputing flair, so we created an SPI peripheral card using 74 series TTL chips. Starting with this design for an SD interface card for Z-80 microprocessors, we modified it to work with the Apple's I/O scheme and upgraded the design. Features include:

  • Four independently addressable SPI channels
  • Automatically sends or reads a full byte at a time
  • Use Apple's on-board clocks (2 MHz or 7MHz), or use an external clock
  • Polling to determine transaction completion - no NOP's required!
  • Blinkenlight mounted to the back of the peripheral card

Bytes are read or written using the Apple ]['s built in Peripheral Card I/O memory locations ($C080 - $C0FF). This card uses four memory locations $C0n0 - $C0n3, where n = $8 + peripheral slot number.

$C0n1 - Serial Select or Monitor: Writing a value to this location asserts the SPI ~SS line (active low) associated with each bit of the low order nybble written. Thus, to select SPI addresses 0 and 2, you would write $x5 to $C0n1. The high order nybble is ignored. Reading this memory location gives the current state of each ~SS line in the low order nybble. The high order bit is set high after the current transaction is completed, facilitating a simple read/BPL loop to wait for the data to be sent.

$C0n2 - Data Read/Write: Writing a value to this location latches in the byte to be sent when the next SPI transaction is started. Read this location after the transaction is complete to pull in the next byte of data from the slave.

$C0n3 - Serial Select Reset - Writing any value to this location will clear all the serial select signals. This is equivalent to writing a $00 to $C0n1

$C0n0 - Start SPI transaction. Writing  any value to this location starts the SPI transaction to send the 8 bits in the output latch and to receive 8 bits from the slave into the input latch. The process is handled by hardware. One needs only to poll $C0n1 to determine when the transaction is complete.

SPI Master PCB.pdf

PCB Design

Adobe Portable Document Format - 182.77 kB - 08/07/2020 at 01:16

Preview
Download

Adobe Portable Document Format - 78.96 kB - 08/07/2020 at 01:16

Preview
Download

BIAS SPI Master v1.1.zip

KiCAD Project Archive

Zip Archive - 73.17 kB - 08/07/2020 at 01:16

Download

Execute_SPI_Command.txt

Sample Code for SPI command send/data recieve

plain - 1.38 kB - 07/09/2020 at 15:15

Download

  • 8 × 100 nF Capacitor Decoupling Capacitors
  • 1 × LED Fiber Optics / Emitters
  • 1 × 74LS00 Electronic Components / Misc. Electronic Components
  • 1 × 74LS540 Electronic Components / Misc. Electronic Components
  • 1 × 74LS175 Electronic Components / Misc. Electronic Components

View all 14 components

  • UPDATE: Cleaning up the clock signal

    spudfishScott3 days ago 0 comments

    I was getting some spurious clock pulses from the card. Turns out the clock signals from the Apple ][ were ringing a bit, so I updated the project to include a simple RC low pass filter to clean them up. Updated the schematic, PCB, and the entire KiCAD project in the File section.

View project log

Enjoy this project?

Share

Discussions

Bharbour wrote 03/21/2020 at 15:56 point

Nice! I did the IO hardware and software development for several embedded projects using wire wrap in an Apple 2+. It worked well.

  Are you sure? yes | no

spudfishScott wrote 03/21/2020 at 19:48 point

Thanks. 40 years later, the Apple ][ is still a great hobbyist machine!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates