Pages created and updated by Terry Sturtevant Date Posted: January 31, 2014

CP316: Microprocessor Systems and Interfacing

Universal Synchronous Asynchronous Receiver Transmitter (USART)

These five USART code examples for the PIC18F452 are from Microchip Technology. They can be applied to any PIC18 part, with minor changes. Each file has a brief functional description in the header at the top of the file. They all receive data and transmit the data back, but do so in different ways to demonstrate typical applications of the USART.

Here is a summary of the features for each code example:

Readable Code Code Transmit/Receive Buffering Packet Definition
P18_TIRI P18_TIRI.ASM Use interrupts for transmit and receive Circular buffers Eight bit data
P18_TPRP P18_TPRP.ASM Poll for transmit and receive Simple buffers Eight bit data
P18_TWRP P18_TWRP.ASM Poll to receive, Wait to transmit No buffers Eight bit data
P18_2STP P18_2STP.ASM Poll to receive, Wait to transmit No buffers Eight bit data, Two stop bits
P18_PRTY P18_PRTY.ASM Poll to receive, Wait to transmit No buffers Eight bit data, Even parity bit


Creative Commons License

Information on this site which is produced by Terry Sturtevant is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Canada License.


To view pdf documents, you can download Adobe Acrobat Reader .
get Acrobat Reader
If you need to update a browser, you might try Firefox which is Get Firefox!
Since this page uses cascading style sheets for its layout, it will look best with a browser which supports the specifications as fully as possible.

If you are looking for an office package, with a word processor, spreadsheet, etc., you might try LibreOffice which is Get LibreOffice!

Go to the main page for the Department of Physics and Computer Science.

Valid XHTML 1.1

Valid CSS!

(Level AA)

Wilfrid Laurier University