Interfacing with UART of PIC microcontroller
This post provides the solution for using the PIC controller UART interface (e-g to connect PIC controller with PC using serial adapter).
Complete code and simulation can be downloaded from the ‘Downloads‘ section at the bottom of this post. The following figure shows the result of simulation of PIC UART in Proteus7.6.
In the main function UART is intialized by calling the function InitUART (defined in the serial.c file included in the project). Then a Hello World! is sent on the UART terminal (e-g using serial adapter you can display this Hello World! on Hyper Terminal on PC). After that, interrupts are enabled because in the Interrupt Service Routine (ISR) UART interrupt is handled as shown below in the code.
For more detail: Interfacing with UART of PIC microcontroller
From Schematic to PCB Production, Just Need One Tool
Free Circuit Design Software: learn to use Editor quickly and easily
Cheapest PCB: 10pcs 2-layers 10cm×10cm only $8.21, 3-day build time, 100% E-test
Current Project / Post can also be found using:
- picprojects serial interrupt
- UART based projects
- uart interfacing with pic18f452 on libstock
- UART PROGRAM FOR INTERFACING WITH PIC18F4550