-------------------------------------------------- From: "Gerhard Fiedler" Sent: Sunday, September 12, 2010 4:05 PM To: "Microcontroller discussion list - Public." Subject: Re: Hyperterminal and Max232 to PIC16F > Oli Glaser wrote: > >> While I'm on the subject though - is it worth adding handshaking to >> make it more solid? Can I expect the odd case of overflow/data loss >> just sending it like this. I figured that at 4800 baud and with a >> 50ms delay between 8-byte (2 bytes per sensor)readings sent that it >> should be easily slow enough not have any issues. However, in the >> interests of making things as bulletproof as possible, could someone >> advise me how to implement handshaking, of where there is a good >> discussion of the subject.. > > If you're talking about "solid", handshake is worth it. As I understand > your situation, it should work most of the time, but there's nothing > that guarantees that a PC isn't "offline" for a second or more. > > You can use hardware handshake or software handshake. I'm assuming that > you only need handshake for sending data to the PC. For hardware > handshake, you monitor the RTS line and stop sending while it is off. > For software handshake, you monitor the serial in and stop sending after > an XOFF character until you receive an XON character. The handshake type > needs to be supported by the terminal program you're using on the PC > end, and typically it needs to be enabled specifically. Yes, the handshaking is only needed for data to the PC really - all that is= =20 sent from the PC is 1-byte commands to initiate functions (like sending=20 data) Hyperterminal has both hardware and software handshaking, so maybe for ease= =20 (as the RTS and CTS lines are connected to the Max232 secondary channel) I= =20 will use the hardware handshaking. =20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .