User manual
Example Projects
© 2006 Microchip Technology Inc. DS51557C-page 41
Discussion
The firmware for this project implements RS-232 communication between the PC and
PIC16F917. The USART is used to perform this communication. If a crystal oscillator
were used as the clock source for the PIC16F917, auto-baud would not be necessary.
However, because the PIC16F917 is using the internal RC oscillator, it is necessary to
perform auto-baud. Auto-baud refers to sending out a known character from the PC,
the MCU measures the time it takes to receive the character, interprets this time into bit
width, and then sets up the baud rate registers accordingly for the USART. This method
allows the RS-232 communication to be free from errors on different microcontrollers
and over temperature variations.
The PIC MCU Communicator GUI is included in this project as an example GUI.
However, it is also a great tool for debugging. Experiment with using the GUI to setup
other peripherals on the microcontroller.