Adding SPI to the TRS-80
14 Mar 2010)
Radio Shack TRS-80 Model 100 (M100) is a true throwback, technology
that is over 25 years old. They still turn up now and then on
Ebay and there is a still an active community of developers and
hackers. I started playing around with them a year or so ago and
still dabble with them. Sure, they're slow, don't run a lot of
apps, and don't have a lot of memory, but they have a few features that
stand out even today. They take cheap batteries you can buy at
the drugstore, they have a LARGE LCD, and they have a full-size,
One thing I didn't like about them was the limited I/O. I do a
lot of embedded control and the TRS-80 has real potential as an
embedded data logger or controller, but how do I add I/O? There
are expansion cards you can plug into the slot in the back, but I don't
like opening up the box and the expansion bus is a full parallel bus
that hooks directly to the MPU's memory bus; I REALLY don't like
exposing the memory bus to the outside.
I decided instead to add an SPI port to my TRS-80. After digging
around on the schematic, I figured out a group of signals that, if
properly isolated, would provide a bidirectional SPI port plus a couple
of chip-select lines. Doing this meant sacrificing some existing
functionality, such as the cassette recorder and the modem, but I don't
use either of them anyway. If you want to retain these features,
you will need to find alternative signals for adding your SPI. If
you can do this, please drop me an email explaining how you did it.
Here is the pinout I settled on for my SPI port. The pin numbers
refer to the pinout of a new 10-pin IDC male header that I added to my
M100. Output and input are based on the TRS-80's view of the
master out,slave in)
|MISO (input; master in, slave
|Vdd (+5 VDC)
chip-select 1, active-low)
chip-select 0, active-low)
|CS0 (output; chip-select 0,
Creating these signals requires some modifications to the TRS-80
circuit board. Note that if you continue with this modification,
you will lose both the cassette port and the modem! If either of
these are dear to you, spend some time with the mod and see if you can
come up with an alternate method to add SPI.
Refer to the following photo and the descriptions below for details.
Here you see the different wiring points I used on the M100's
motherboard. Refer to this photo as you read the following signal
I started by removing CN3, the cassette port. I'm never going to
use a cassette drive with my M100 and that area of the board is a
perfect place to add my 10-pin IDC header.
For GND (pins 1 and 2), I wired to pad 6 of CN3; refer to the
silk-screened legend in the area around the cassette connector, CN3.
For MOSI (pin 3), I pulled C63, a 0.1 uf capacitor, and wired to the
pad hooked to M34-12. This removes the TXC signal from the M100's
cassette connector. You drive MOSI by changing the state of the
80c85's SOD pin.
For MISO (pin 4), I pulled R72, a 33K resistor, and wired to the pad
hooked to M34-11. This removes the RXC signal from the M100's
cassette connector. You read MISO by reading the state of the
80c85's SID pin.
For SCK (pin 5), I pulled R50, a 3.3K resistor, and wired to the pad
hooked to M34-4. This removes control of the cassette's relay,
RY1. You change the state of SCK by writing a 1 (SCK goes low) or
a 0 (SCK goes high) to bit 3 of any I/O port in the range E0h to EFh.
For Vdd (pin 6), I wired to a pad on the +5VDC plane near the
silk-screened legend "R46". You can find this pad near pin 14 of
For *CS1 (pin 7), I wired to the pad hooked to M36-12. Note that
this is the Q* output of the same flip-flop that drives the ENABLE
signal of the MC14412 modem IC, M31. I don't know what effects
will be generated if you toggle this input rapidly. If you want
to disable the modem IC completely, cut the trace between R146 and
M31-12, then tie M31-12 to M31-13. This grounds EN and ensures
the modem never turns on. You change the state of *CS1 by writing
a 1 (*CS1 goes low) or a 0 (*CS1 goes high) to bit 1 of any I/O port in
the range A0h to AFh.
For *CS0 (pin 9), I wired to the pad hooked to M36-2. You change
the state of *CS0 by writing a 1 (*CS0 goes low) or a 0 (*CS0 goes
high) to bit 0 of any I/O port in the range A0h to AFh. You
should also remove R134 if you intend to use *CS0; see the next
For CS0 (pin 10), I wired to the pad hooked to M36-1 and removed R134,
a 3.3K resistor. This removes control of the hook relay, RY3,
which means the modem control of the off-hook relay is gone. If
you don't remove this resistor and if you toggle CS0 rapidly, you can
damage or destroy RY3. You change the state of CS0 by writing a 1
(CS0 goes high) or a 0
(CS0 goes low) to bit 0 of any I/O port in the range A0h to AFh.
Note that *CS0 and CS0 are opposite states of the same bit. Any
time you change the state of one of these outputs, you automatically
change the other output!
Here you see the 10-pin IDC connector epoxied to a piece of black
Sintra plastic. This plastic is then foam-taped to the
motherboard in the space originally used by the cassette connector,
CN3. Note that to gain room for plugging in a 10-pin female
connector when the case is put back together, I had to enlarge
carefully the cassette port opening with an Exacto knife.
I don't yet have any software to use this SPI modification. I
haven't taught myself enough 80c85 and M100 programming to gain access
to the 80c85's SOD and SID pins under BASIC control. I know that
I can change states of the chip-selects and other ports but I'm still a
ways away from a finished program. If anyone reading this goes
the next step and puts together a BASIC program for talking via SPI to
a serial device, please let me know! Otherwise, the software is
on my to-do list.