Question: Question 03 PIC microcontrollers use two main UART (Universal Asynchronous Receiver/Transmitter) serial communication methods, UART - Universal Asynchronous Receiver/Transmitter USART - Universal Synchronous/Asynchronous Receiver/Transmitter a)

Question 03 PIC microcontrollers use two main UART (Universal Asynchronous Receiver/Transmitter) serial communication methods, UART - Universal Asynchronous Receiver/Transmitter USART - Universal Synchronous/Asynchronous Receiver/Transmitter a) List down the difference between UART and USART communication. (3 Marks) (3 Marks) b) Briefly explain three modes of UART communication. c) UART data frame consists of a start bit, data bits, parity bit and stop bit. i. Name each block of the given UART data frame. (2 Marks) ii. (5 Marks) Briefly explain the followings, Start bit Data bits Parity bit Stop bit Baud rate d) List down the advantages and disadvantages of UART communication. (3 Marks) e) Write a C program for UART communication of two PIC 16F877 microcontrollers. A toggle switch is connected to PORTB, Oh (RBO) pin of one microcontroller and this microcontroller read whether the input is 5V or OV. Then read value will be transmitted to the second microcontroller using UART communication. The second microcontroller receives the data and if the toggle switch input is 5V, the PORTD 0" (RD0th) pin output should be 5V. Otherwise, if the toggle switch input is OV, the RDO" pin output should be OV. Write down two C programs that can be used with each microcontroller. UART initialization, UART read, UART write and other functions are given char UART_Init(const long int baudrate) 1 unsigned int x; X - _XTAL FREQ - baudrate-64)/(baudrate*64); if (x>255) * = (_XTAL_FREQ - baudrate 16)/(baudrate.16); BRGH - 1: if(x255) * = (_XTAL_FREQ - baudrate 16)/(baudrate.16); BRGH - 1: if(x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
