Serial communication with Pic 16f877 using UART

Abstract of that project: Using UART port we can establish serial communication between any devices. Here in my project Serial communication with Pic 16f877 using UART I will show you how easily we establish communication between two devices. In my project we know the pin no 25,26 in PIC16F877 are use as UART. The pin number 25 is use for receiving and 26 is used for transmitting.

Hardware needed: See the circuit diagram bellow we use MAX232,UART port, Pic16f877 and LCd (Lm106L) to make our project.

Serial communication with Pic 16f877 using UART circuit

 

For Simulation: we use Mikcro C pro to write the embedded C program for PIC16F877. We used Proteus 7 Professional for simulation. And for simulation of our project Serial communication with Pic 16f877 using UART, we replace COMPIM and MAX232 with Virtual UART Terminal.

So see our replace circuit for simulation in Proteus in bellow.

Serial communication with Pic 16f877 using UART schematic

 

Mikcro C Pro Code:

To interfacing UART with Pic we have to use some new command those are

UART1_Init(Baudrate):is Initialize UART module at specified baudrate.

Β UART1_Data_Ready() : use to check data is receive or not.

Β UART1_Write_Text(β€œStart”): use to write declared text on uart

Β UART1_Write(): use for transmit uart data.

Β UART1_Read(): use for read the uart data.

Β Now see at below the programing code to understand use of above mention command.

For more detail: Serial communication with Pic 16f877 using UART


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.