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.