[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Home Automation with GS
Vince Scoglietti writes ...
>>Hello,
I just read the home automation with a PC parallel port
article in the September issue of Popular Electronics.......in the
article, there are plans for a PC parallel port controlled board with
8 relays that switch 120 volt AC on/off. The idea is to set up an old
PC AT/XT with this board, and have it turn on lights, heaters, etc. at
specific times of the day. The PC issues a hex byte out of the
paralle port, and each of the 8 bits turns a relay on or off (you also
have to build a parallel cable with the appropriate resistors in line
to avoid frying things). Anyway, I don't have a spare AT or XT, but
I was wondering if I could use the modem port on the back of my IIGS
(which doesn't get much use nowadays). I realize that this is a serial
port, which would fundamentally change the hex byte operation, but
it'd be cool even if I only had one relay wired. Anyone have any
information, stories, etc? I'd especially like pinouts of the port, a
routine to read the GS clock from Applesoft, and the POKE's that
operate the serial ports.
Also, does anyone control model trains from their Apple? I
think it'd be cool to switch operating lights on/off, semafores, and
perhaps a Apple controlled variable potentiometer for throttle?
That's a stretch (I'm utterly clueless on this one), but novel
anyways.
<<
As you probably guessed, all of the above (and more) was done with
II+'s a long time ago. The main advantage of using a PC XT or a '286 AT
is that they are worth nearly nothing on the open market.
The easiest way to experiment with controlling stuff using your GS
is via the Annunciator outputs available at the 16-pin Game Socket-- it's
an empty IC socket-- inside the GS. Each of the four outputs, AN0-AN3,
can be toggled to a "1" (ON, about 5V) or "0" (OFF, about 0V) by PEEKing
appropriate addresses:
OFF Address ON Address
AN0 (pin 15) 49240 49241
AN1 (pin 14) 49242 49243
AN2 (pin 13) 49244 49245
AN3 (pin 12) 49246 49247
+5V (pin 1)
GND (pin 8)
You can plug a 16-pin connector ribbon cable into the socket and run
the signals to a breadboard for experimenting. The outputs are
low-current signals; so, you would want to use them to drive transistors
for activating relays.
Rubywand