Hi,
I´m now playing with my protoboard using UART.
I suppose most of MCUs has 2 UART channels, you can use whatever you like ... ch1 or ch2. In the init process you will define the channel.
Processor Expert makes very easy to use the UART. As it provides you with some functions to read and write.
It´s very easy, just connect MCU´s Tx pin to the Rx pin of the "other side" (receiver). And MCU´s Rx pin to the Tx of the PC, robot, anything.
With that you have a fantastic Serial communication done. All the rest is software.
RS232 transceiver will need MAX232 or similar to adapt the line voltages. In the case of USB (Virtual COM) there is no needed of that, cause chips like FT232 or TUSB can be connected directly to the MCU.
Datasheet of the FT232R brings different examples and one of them show how to connect it with a MAX232.
What is the other "handshaking" pins. Well, I´m not using it. For what I know handshaking pins are needed when you are sharing the lines (Tx,RX) with three or more devices. So you can tell when the line is busy and free.
I have read somewhere in this post that Channel 1 of the UART is connected to the USB. That means if you are going to use the USB (with Serial COM) with another device connected to the same channel plus the MCU THEN you need handshaking (three devices speaking in the line).
But if you are going to make Point to Point communication there is no needed to connect any of the handshaking pins. Leave unconnected.
In the MCU whenever something enters in the buffers an interrupt request will enter and wake up the MCU.
In PC for example, the SO has an automatic buffer reception implemented.
To Know when it has finish the transmission it depends of the application, but with some aspirines and software you can go with it without problem.
Remember that UART knows when a character has been received. UART doesn´t know nothing about Strings, only characters. The IRQ of the MCU will automatically save your characters in a buffer. and you can get the string from there.
From the handshaking I don´t know much more. I don´t know why in a point to point protocol handshaking should be used. I think there is no needed of that because or redundance. Someone knows more about this?
Regards.
Cris.