SPI Controller Device


65SPI

An SPI interface for the 65C02 family of microprocessors

This device was created to provide a basic SPI interface for the 65xx family of microprocessors.   Currently, the only way to provide SPI is to bit-bang it using a 6522 or equivalent device.   That uses a lot of microprocessor time and program space.   This device takes care of the data loading, shifting, clocking, and control - freeing the microprocessor for more important duties.   There is interrupt support to allow an ISR to handle the SPI interface.   The status register provides signals for polling if interrupts are not desired.

Features:

∑ CPU bus is compatible with 65C02 and 65C816 microprocessors
∑ Uses 4-byte memory map for host access to registers
∑ Operates as an SPI master
∑ SCLK derived from PHI2 or an External Clock source
∑ SCLK has an 6 bit programmable divider Ė CLK/2 through CLK/128
∑ SPI Mode 0, 1, 2, 3 supported
∑ Shifts MSB first
∑ 8-bit Slave select register with 8 Slave Select outputs
∑ External slave select decoding can yield up to 255 addresses.
∑ Direct slave select decoding yields 8 devices
∑ Programmable interrupt
∑ Interrupt or polled transmit complete flags

Chip Layout:

Pin Descriptions

A0-A1    Microprocessor address bus (input)
CS1      Chip select, active high (input) 
/CS2     Chip select, active low (input) 
D0-D7    Microprocessor data bus (bidirectional)
EXTC     External shift clock (optional input) 
GND      System ground 
/IRQ     Microprocessor interrupt line, active low (output) 
MISO     SPI Master In, Slave Out line (input) 
MOSI     SPI Master Out, Slave In line (output) 
PHI2     Microprocessor system clock (input) 
/RES     Microprocessor reset line, active low (input)
R/W      Microprocessor data read/write line (input) 
SCLK     SPI Shift Clock output 
SS0-SS7  Slave Select lines (outputs) 
VCC      System +5vdc 
n/c      No connection 

Register Address Map

CS1/CS2PHI2A1A0R/W=1 (Read)R/W=0 (Write)
0xxxxHi-ZHi-Z
x1xxxHi-ZHi-Z
xx0xxHi-ZHi-Z
10100SPI Data InSPI Data Out
10101SPI StatusSPI Control
10110SCLK DivisorSCLK Divisor
10111Slave SelectSlave Select
    x = donít care

See the full datasheet along with the source and Intel Hex object files here -> 65SPI

I can provide pre-programmed chips upon request,while my stock lasts. Please see here for details Items for Sale


Home
All info provided "as-is" and is Copyright 2010.