Re: Using a mac classic 1 to send a signal through a cable
- From: David Phillip Oster <oster@xxxxxxxx>
- Date: Thu, 30 Mar 2006 15:36:30 GMT
In article <1143728217.851282.233740@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"Mu0n" <micjuneau@xxxxxxxxx> wrote:
I'm just looking for general principles to guide me in this.
I want to use a (compact) mac classic (system 7.1) to send a signal
through either of the possible cables that connect to it. It could be
appletalk, a serial cable, printer port, etc. Which should I use to
reduce the lag as much as possible? The signal doesn't have to change
quickly, it just needs to be on for a long time, and turned off at a
microsecond-precise schedueled time. It will be used to cut off another
independant circuit that is discharging a condenser.
The part about microsecond precision - I've done it before by using the
various time managers and I need no help with this.
I just need some vague pointers that would guide my choice over the
best option that I can use for this project. Is appletalk better? Is
the printer port more responsive?
The printer serial port and the modem serial port are essentially the
same. you can use PBControl() calls to directly set bits on the
dual-UART chip that controls them, which is connected to the DTR (Data
Terminal Ready) line on the cable (I may have the exact name of the
serial port ready line wrong). You can actually bypass the operating
system, get the address of the chip, and directly write to the registers
on the chip. You can't get much better latency than that.
You will get jitter because of other interrupt tasks on the machine. In
Macsbug:
hz
will give you an idea of what else is running. Get rid of as much as you
can. Turn off appleTalk. But a floppy in the floppy drive so you won't
be polling for disk insertion events.
(I once wrote a digital oscilloscope that used a similar technique to
poll the CTS line on the serial port at regular intervals, and
graphically display the results. It worked, but it couldn't show me that
the digital signal I was trying to decode had a much higher voltage
swing than the chip could handle.)
.
- References:
- Prev by Date: Re: 100% CPU in C++
- Next by Date: Re: Using a mac classic 1 to send a signal through a cable
- Previous by thread: Using a mac classic 1 to send a signal through a cable
- Next by thread: Re: Using a mac classic 1 to send a signal through a cable
- Index(es):
Relevant Pages
|