Pages created and updated by 
Terry Sturtevant 
	 Date Posted: 
	 
	 May 12, 2017
	 
	 
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.
Reading: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 

 
	 
	 
 

Wilfrid Laurier University
© 2019 Wilfrid Laurier University