Hardware Handshaking For AVR

Serial communication is still an important part of our embedded world. Typically we use a 3 wire setup (RX TX and GROUND) and hope that everything goes according to plan. Though this works for most experimenters, sometimes its not the most ideal situation. ┬áThis is where [simmonmt’s] handiwork comes in adding hardware handshaking to a AVR.

The hardware setup is pretty typical, an Atmega644 sits on one end of the connection, passes through a SP3232EB level shifter and out to a PC. 5 lines are used, again one for RX, TX and GROUND, but also RTS and CTS. When the PC is ready to transmit data it inverts the line (normally held high), the micro controller notices this it pulls CTS low and transmission can commence whenever it darn well feels like it. Handy!