[A86] Async Link Routine


[Prev][Next][Index][Thread]

[A86] Async Link Routine




Hello,

	I have been working on a project that requires excessive use of the link 
port.  In particular the project requires that data come both into and out 
of the link port at arbitrary times.  I am very familure with the existing 
link port routines and the protocol they impliment.  The problem I'm 
experiencing involves communicating through the graphlink.  I thought I 
would pose the problem here, to see if anyone has encountered this, or has 
ay suggestions.

	What I want to acheive is "two-way" communication with another device using 
the graphlink.  My initial strategy was to check to see if there is 
incomming data before every byte that is written out to the link port.  If 
there is incomming data, then read it before attempting to send.  This 
policy would be totally fine for my purposes.  It isn't exactly symetric 
full-duplex, but it allows two-way random communication.  But I found that 
in fact the graphlink appears to be incapible of supporting even this 
algorythm  In particular it appears to be unable to signal when it has 
incomming data.  I'll pose the problem with the following chllange.

	Write a program that constantly sends bytes out the link port but has the 
ability to detect, pause, and read any incomming bytes.  So for example, if 
this program where run with the calc connected via the graphlink to a PC 
running some terminal software, the PC should show a constant flow of data 
on the terminal's screen.  If a user presses a key, or sends a bunch of data 
to the calc while it is sending to the PC, I want the calc, to pause long 
enough to read any incomming data and resume sending bytes to the PC.

	From my experimentation with the graphlink, I have found this sort of 
routine to impossible to write.  From what I can tell, it appears that the 
graphlink "freezes" when it receives incomming RS-232 data, and doesn't 
bother to check for data comming from the calc before relaying the RS-232 
data.  When I try to do this, the "check-before-send" part of the algorythm 
fails, and the calc tries to send while the graphlink is also trying to send 
to the calc.  What I end up getting is garbled input.  Event though the 
output timesout, I can copensate for this in software and resend any lost 
outgoing bytes.   But the garbles incomming bytes are lost and are 
unrecoverable.

	This probibly seems like a mouthfull.  I have struggled just to find a way 
to describe the deffeciency that is keeping me from creating this 
functionality with the graphlink.  Just try to write a simple program like 
the one I challanged above and you should see what I'm talking about.

	I hope that I have been clear enough to explain my problem fully.  Let me 
know what I can add to better explain what I'm saying.

thanks,

David E. West

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com




Follow-Ups: