[comp.sys.amiga.hardware] Help with serial device

scot@amigash.UUCP (Scot L. Harris) (05/05/90)

This is being posted for someone on the local net without access to usenet.
Please send all responses via email to me at !rtmvax!amigash!scot.
Thank you.
---------------------------------------------------------------------------
April 24, 1990

To any serious AMIGA programmers out there,
I have a problem that I am desparately in need of help with.
Any solutions, pointers, etc. to solving this would be very greatly
appreciated.

Here's the problem;
In order to make the amiga interface with some very nifty external hardware,
the AMIGA must be able to do several things.

First, it must be able to read the status of the CTS line, irregardless
of the state of the RTS line.  Specifically, this means an external device
could initiate a message by asserting CTS (on the amiga port), which an
AMIGA resident task would, identify as a request to open communications,
respond with RTS, and then recieve the message with normal RS-232 protocol.

Second, if the AMIGA is the initiator of the communication, it must be able
to assert or de-assert the RTS line quickly, (within about 1 mSEC).  After
that it would await assertion of CTS, before beginning transmission, just
like it normally would.

So far, using the test program in this same program group, I have found the
following;
The only way that I have been able to accomplish the second
objective is to explicitly open and close the serial device.  The round trip
time to assert/de-assert RTS this way is almost 5 mSEC.  This is definitely
too slow and cumbersome, and is churning up to many CPU clock cycles for
just setting/re-setting one lousy little line.  It also gets in the way of
accomplishing the first objective, because in order for a status query to 
work (to read the status of the CTS line), the device has to be open.
This means in order to read CTS, RTS will already be asserted, (an incorrect
handshaking sequence when external HW initiates communication.)

Even if I got past the above, the query function itself doesn't seem to 
work correctly.  It seems to pick up changes in the DSR line, but not
the CTS line.  I can't seem to pin down why this is.  If it really is 
just reading the status of the 8520 CIA chip, why doesn't it pick up
everything out there as well.

The bottom line of all this is that maybe the AMIGA serial device driver
is just flaky, and I will need to get some help from some clever 
programmer type that has a replacement serial driver sitting around 
somewhere.  I have not seen anything on the local BBSs that looks like
it will fit the bill.  Perhaps there is some better way of using the
existing serial device, than what I did in my test program also.

If you do think you have some insight into this, or just some pointers,
please give me a call.  I can be reached (when I'm not in the lab) at 
(407) 356-9711 (voice).  I'm also on the local BBSs every few days or so.
MOONLIGHTER 292-6080 or LOOKING GLASS 381-5476.
                              Thanks,
                                             John Gerthe


--
          _                                                                
    ///  /_\      Scot L. Harris ...!tarpit!rtmvax!amigash!scot 
  \XX/  /   \ M I G A   2872 Stallion Dr., Orlando, FL 32822  (407)273-1759 
[VoRecOne by Impulse.  Now my Amiga hears me, but does it really listen to me?]