in reply to Timing issue while accessing serial port
In the "bad old days", and still sometimes today, there is what is called "hardware flow control" and serial ports wiggle dedicated lines to regulate the flow of information..."Wait,...my buffer is full right now!". In "Dilbert-ese", "my brain is full!".$PortObj->handshake("xoff"); $PortObj->xon_limit(100); # bytes left in buffer $PortObj->xoff_limit(100); # space left in buffer $PortObj->xon_char(0x11); $PortObj->xoff_char(0x13);
These "flow control" lines took extra pins on the connector. On the modern DB-9 connectors, not all of these lines are even there!
The old farts were not stupid. But, they didn't have smart IC's which in themselves contained buffer memory. Modern UARTs (Universal Asynchronous Receiver/Transmitter) can send an "in band" signal to tell the other guy to "shut up". This is the X-ON/X-OFF protocol.
Its like the "mother-in-law" is spewing out massive amounts of verbage and you just whisper "stop" and she does! Magic!
I would leave that X-ON/OFF protocol alone unless a good reason to over-ride it surfaces. And of course that certainly can happen!
I would also concentrate on what you send and what you receive. Forget performance until you get the correct command and response data. I'm not sure that you have that yet.
|
|---|