serial communication of pic18f458


  • What is serial COM ?-   A computer transfers data by two methods called serially and parallelly, both have its own merits and demerits according to application. Here we discuss only about serial communication. In serial com data are transfers bit by bit from transmitter to receiver.


  • About & Types serial COM-
  1. If data transmitted one way a time, it is referred to as half duplex.
  2. If data can go both ways at a time, it is full duplex.



Following are the pin connectors that are used to connect microcontroller with PCs.

  • Serial data communication uses two methods:
  1. 1.  Synchronous method transfers a block of data at a time
  2. Asynchronous method transfers a single byte at a time
  • Asynchronous serial data communication is widely used for character-oriented transmissions

(1)     Each character is placed in between start and stop bits, this is called framing (8-bit = single character)

(2)     Block-oriented data transfers use the synchronous method

  • The start bit is always one bit, but the stop bit can be one or two bits. Due to the extended ASCII Characters, 8-bit ASCII data is common. In modern PCs, the use of one stop bit is standard. Assuming that we are transferring a text file of ASCII characters using 1 stop bit, we have a total of 10 bits for each character including 8 character with 1 start and 1 stop bit.
  •  The rate of data transfer in serial data communication is stated in bps (bits per second). Another widely used terminology for bps is baud rate.  It is modem terminology and is defined as the number of signal changes per second. In modems, there are occasions when a single change of signal transfers several bits of data.
  • The data transfer rate of given computer system depends on communication ports incorporated into that system
    • IBM PC/XT could transfer data at the rate of 100 to 9600 bps
    • Pentium-based PCs transfer data at rates as high as 56Kbps
    • In asynchronous serial data communication, the baud rate is limited to 100Kbps
  • In RS232 protocol, a 1 is represented by -3  to -25 V, while a 0 bit is +3  to  +25 V, making -3 to +3 undefined and support TTL logics.
  • Microcontroller used CMOS logics generally, so we need a line driver such as the MAX232 chip which is required to convert RS232 voltage levels to CMOS levels, and vice versa.
  • Following diagram is shown interfacing diagram of ATmega32 with PC and use of MAX232 IC.

serial communication of pic18f458 microcontroller

  • To allow data transfer between the PC and an microcontroller system without any error, we must make sure that the baud rate of microcontroller system matches the baud rate of the PC’s COM port.
  • Applications-  Communication between computer and microcontroller.

Click Here : Understanding of RS232 protocol and setting up baud rate

Click Here : Registers used in serial com programming

1. Circuit Diagram Of serial communication of pic18f458 microcontroller

Circuit Diagram Of serial communication of pic18f458 microcontroller


 2. Circuit Diagram Of serial communication of pic18f458 microcontroller With LCD

Circuit Diagram Of serial communication of pic18f458 microcontroller With LCD



1. Program of serial communication of pic18f458 microcontroller

In this program controller send “” to PC or Laptop and it will display on the hyper terminal of PC or Laptop


PROTEUS File for SIMULATION(Password Of RAR file is

download (1)


2. Program of SERIAL COMMUNICATION  Of PIC18F458  with LCD

In this program data entered from the hyper terminal of PC or Laptop is appeared on the LCD connected to the controller


PROTEUS File for SIMULATION(Password Of RAR file is

download (1)


Content for the tab VIDEO