BTW, beginning at page 264 of the book "Inside the TRS-80 Model 100", it
describes a simple circuit to add a port (both input and output) to the
M100 using the expansion bus. There are of course more modern chips to
simplify that further. I would just add an 8255 now.
Also from the Inside book:
Unused PinsTwo pins in the Model 100 are available for hobby usage.
The first is an input port signal at M23, pin 2. This pin, presently
wired only to a pullup resistor, controls bit 6 of input port 208.
If a switch were connected from this pin to ground, software could
determine the position of the switch by ANDing the value at port 208
with 64. If the result is zero, then the switch is closed.The other
unused pin is M16, pin 14. M16 is the integrated circuit that
controls I/O ports 128 to 255. Pin 14 is usually at 5 volts, but
drops to 0 whenever I/O ports 144 to 159 are accessed by the CPU.
This signal could be fed to other CMOS integrated circuits or, with
suitable buffering, could be used to control devices outside of the
Model 100.
There are actually quite a few projects in the Portable 100 magazines as
well.
An interesting use for the cassette relay might be to control a
booklight for the screen. Better to have a battery operated one and just
hack into the switch, but if someone wanted to power it from the M100,
they could route 5V to the two unused pins on the cassette port (7 & 8)
and put the whole thing on just one port.
Scott
On 10/18/2025 11:44 PM, Scott McDonnell wrote:
You use a flipflop for the chip selects. You latch the first 8 bits
and then the next strobe selects the second latch. The strobe is the
clock for the flipflop.
After setting the 8 bits, you strobe. This latches the data on the
first latch and also toggles the D-type flip flop which toggles. That
selects the second latch. You output another 8 bits and then strobe
and that selects the first latch. So on and so on.
You could also send a nybble at a time using the high nybble to select
the 4 bit latch (or up to 16x 4 bit latches even).
Or using 74LS138s, the lower nybble is the data, the higher nybble
chooses between 2 '138s
You could also bit-bang serial to parallel shift registers and cascade
them (74HC595) Probably the easier method.
Or even use a 16 bit MCP23S17 IO expander. The "S" is the SPI version
and can be clocked as slowly as you want.
Plenty of different ways to do it.
On 10/18/2025 11:10 PM, B9 wrote:
Nice! I like that controlling it is a simple matter of "MOTOR ON" and
"MOTOR OFF".
I found the article you're talking about here:
https://archive.org/details/P100-Magazine/1989-01/page/5/mode/1up
(The key detail is that the pins the MOTOR command connects are 1 and
3 on the cassette port. Don't switch more than 12V, 200mA.)
Controlling 8 relays from the printer port I can understand — each
bit of the output byte maps to one pin — but how did you do 16?
And what does the interface from BASIC look like?
--b9
On October 18, 2025 6:11:50 AM PDT, Scott McDonnell
<[email protected]> wrote:
I am sure most people were already aware of this, but thought I
would mention it for those that didn't: The cassette port has a
single relay used to control the remote input on a tape recorder.
This is a fairly low current relay. It controls the voltage to
the motor in a tape player/recorder acting much like a pause
button. Since it is fairly low current, you probably wouldn't
want to use it directly, but what can be done is to use it to
drive another larger relay. It is perfectly capable of driving
the coil of another relay. This gives you a simple real-world
interface already built in. The circuit is really simple for
those handy with electronics. But for those that need more
information, there is actually an article in the January 1989
issue of Portable 100 (page 6) which gives the details and
programming information. I am soon putting together a simple
example of controlling 8 and 16 relays from the printer port.
Nothing fancy, but if there is interest in the details for it,
let me know. Other mods I have been talking about are waiting for
a few more parts (shipping has been VERY slow lately) so that I
can get in there and just do it all at once.