[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reporting Data 1-Way-Out?
Steve ][ wrote:
Thanks for the follow-ups on this post. I just discovered the IIGS
joystick-reading ToolBox code (thanks to Michale Stephens). So I think
what I'd like to do is read temperature or water pH or etc from the
outside world via the 16-pin joystick port* and then send the data
using AppleTalk under GS/OS. I could use Complete Pascal 2 to code the
input reading and output writing. If I was going to work closer to the
metal, I would definitely try NadaNet or Contiki - but I think I have
a higher chance of finishing the project if I don't have to write a
protocol (or learn a new one) or buy a lot of hardware. I think going
"high level" just means I have to find the right Gatorbox to go from
AppleTalk port to ethernet.
All comments welcome on helping me think this through.
Thanks!
This is, of course, using a cannon to shoot a mouse--since it's all
for fun, I fully understand. ;-)
But why run GSOS and a compiled program to do something that can be
easily done in a few lines of Applesoft BASIC?
100 print chr$(4)"pr#2" : rem select serial output
110 x=pdl(1) : rem read sensor
120 y=<some calibration function of x>
130 print y : rem send the data followed by a <cr>
140 for i=1to1000 : next : rem delay a little
150 goto 110 : rem keep doing it
* Anybody know where I can get a "port extender" to get the joystick
port outside of the IIGS case?
Although the DIP plug and socket made some sense for an on-board
connector, it's pretty inconvenient (not to mention fragile) for
frequent use. How about an adapter from the sensor DIP plug to
a DE-9 plug so that you can connect the sensor (a paddle input)
through the external 9-pin joystick port?
To make one, you'll need a 16-pin DIP socket, a length of cable
(but not over 10 feet to avoid noise and other problems), and
a DE-9 plug. All these are very common parts, but two or three
wires will need to be soldered (for the needed paddle conncetions).
* Can anyone recommend decent input device hardware that can go to the
joystick port and a book?
The joystick port (on all but the IIc and IIc+) is very simple.
It provides three inputs that respond to TTL logic levels (0v and +5v)
and four "paddle" inputs that sense variable resistances of 0-150k Ohms.
For convenience, it also provides ground and +5v connections.
Many simple sensing applications can be adapted to these inputs.
Lots of articles (and even some books?) have been written about
building devices that plug into these ports.
What is missing from the joystick port that is provided on the internal
16-pin game port are outputs. The game port provides 4 digital TTL
outputs (the "annunciators") and one pulse output ("strobe") that allow
for 2-way communication with the outside world.
Because the game port provides outputs, it is much more versatile than
the joystick port. (NadaNet uses the game port. ;-)
It should be noted that late-run //e boards (the ones with 2 64kx4 DRAMs
instead of 8 64kx1 DRAMS, and with 1 "CF" ROM instead of 2 "CD" and "EF"
ROMS) have crippled the three digital inputs on the joystick port and
the game port by shunting them to ground with 0.1uF capacitors. These
must be removed to allow the inputs to deal with fast signals. (The
capacitors were apparently a late addition to reduce RF interference,
which I've never found to be a problem.)
The digital inputs on the IIc and IIc+ require much more electrical
drive and a wider signal swing because of their "double duty" use as
pushbutton inputs and mouse inputs. As a result, many devices that
work well with all other Apple II pushbutton inputs do not work with
those machines.
One other note: on all Apple II's with internal game ports, the
orientation of the DIP socket is with pin 1 toward the front of the
machine--*except* the IIgs! On the IIgs, pin 1 is oriented toward
the rear of the machine for some perverse reason. Since a DIP socket
has no mechanical polarization, this means that you have to be careful
when plugging a device into a IIgs, since it's reversed compared to
the other machines.
On Mon, 12 May 2008 11:47:46 -0400, "Steve ][" <sc-ii@hotmail.com>
wrote:
Kind of a ramble, hopefully you will get what I'm trying to "say".
I was thinking about using a IIGS to do some data capture (like
outdoor temperature, etc like the stuff from
http://www.vernier.com/legacy/apple/mon.html). But I want the IIGS to
sit in the attic and do it qiuetly, putting the data "somewhere else"
where I can get to it from one of the PCs or Macs in the house. That
would take some hardware as well as software... Since I'd use the
16-pin joystick port to read the data, what would be the smart/cool
way to do 1-way, write-only data output to another computer?
Ideally I'd like to blast it over ethernet so one of the already
LAN-connected computers can get it.
I wouldn't mind sending the data out of the modem or printer port
using any protocol to one of the LAN computers.
I wouldn't mind using some kind of Gatorbox-ish thing either.
Anything.
Thanks.
-michael
NadaPong: Network game demo for Apple II computers!
Home page: http://members.aol.com/MJMahon/
"The wastebasket is our most important design
tool--and it's seriously underused."