Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a serial port program to send a string serially YourFirstName YourSecondName and wait for the receiving string Acknowledge. Then terminate the program. Use baudrate
Write a serial port program to send a string serially "YourFirstName YourSecondName and wait for the receiving string Acknowledge. Then terminate the program. Use baudrate of 4800, Fosc=8000 Note: Put your first and second name in place of the string. e.g. "USAMA AHMAD". WRITE PROGRAM FOR AVR AT Mega328 course: Microprocessor and Microcontroller FOR REFERENCE PLEASE CONSIDER FOLLOWING EXAMPLES Example 1: Sending a Byte Serially // Send a character 'A' = 0x41 continuously. #define FOSC 160000OOUL // Clock Speed #define BAUD 9600 #define MYUBRR FOSC/16/BAUD - 1 void USART_Init() { UBRROH = MYUBRR > > 8; // Set baud rate UBRROL = MYUBRR; // UBRROL = 103 UCSROB = (1 > 8; // Set baud rate UBRROL = MYUBRR; // UBRROL = 103 UCSROB = (1> 6; } 33 Example 2: Sending a String Serially // Send a string youtube.com/rfchishti continuously using Serial Port at 9600 baud rate. void USART_Init() { UBRRO = 103; // Set 9600 baud rate UCSROB = (1> 2; // Show bit 2 to bit 7 on PORTB PORTD = temp > 8; // Set baud rate UBRROL = MYUBRR; // UBRROL = 103 UCSROB = (1 > 8; // Set baud rate UBRROL = MYUBRR; // UBRROL = 103 UCSROB = (1 > 8; // Set baud rate UBRROL = MYUBRR; // UBRROL = 103 UCSROB = (1> 6; } 33 Example 2: Sending a String Serially // Send a string youtube.com/rfchishti continuously using Serial Port at 9600 baud rate. void USART_Init() { UBRRO = 103; // Set 9600 baud rate UCSROB = (1> 2; // Show bit 2 to bit 7 on PORTB PORTD = temp > 8; // Set baud rate UBRROL = MYUBRR; // UBRROL = 103 UCSROB = (1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started