by Jon Chandler » Thu Feb 04, 2010 4:16 pm
Searching on UART turns up 100 listings here, including at least 2 tutorials. That might be a good first step if you don't understand something.
The data sheet for PIC micro-controllers is big and scary but you don't have to read the entire thing. UART is explained there in a paragraph.
The Swordfish help file is a great reference too.
People will be happy to help here, but the basic concepts are well documented. People would rather help with real problems than answering questions about the basics.
All that being said, there are a couple important details. Swordfish supports the hardware UART (or even 2 on some chips) and software UARTs too. Using the hardware UART is the best bet - software UARTs have some gotchas, particularly when receiving data.
UARTs are typically used for RS-232 connections. RS-232 uses levels of +/- 9-12 volts for signaling. The PIC puts out 0 / 5 volt signals. A MAX232 chip is used to convert levels. If your PIC board has an RS-232 chip, you can (make that MUST) use an RS-232 - USB converter to connect to a PC without a serial port.
If your PIC board does not have a MAX232 chip, you need a "UART" to USB converter. It will handle the 0 / 5 volt levels from the PIC. These can be found on eBay and are often used with cell phones.
Alternatively, a PICkit 2 contains a UART tool that will connect to the 0 / 5 volt levels of a PIC to display the serial data on a PC.
Jon