What baud rate the program sets for serial communication? How many seconds it takes to send...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What baud rate the program sets for serial communication? How many seconds it takes to send or receive one full byte? Show calculations. [10 points] [5 points] 2. Explain what is the purpose of lines UCSRA=0x00; and UCSRB=0x58; in the code? 3. Which pin of PORTB toggles if the program receives character *Z'? [5 points] 4. The program uses polling method to receive data serially, re-write the code for interrupt-based receiving of data. Use Receive Complete Interrupt. [15 points] 1. // Problem 2 code #define F_CPU 16000000UL #include <avr/io.h> #include <avr/interrupt.h> void main(void) { char ch; UCSRA=0x00; UCSRB=0x58; UBRRH 0x00; UBRRL-OXOF; DDRB=0xFF; sei(); while (1) { if (UCSRA & 0x80) { ch - UDR; switch (ch) { } case 'a': case 'b': default: PORTB = PORTB^0x10; break; PORTBPORTB^0x20; break; PORTB = PORTB^0x40; What baud rate the program sets for serial communication? How many seconds it takes to send or receive one full byte? Show calculations. [10 points] [5 points] 2. Explain what is the purpose of lines UCSRA=0x00; and UCSRB=0x58; in the code? 3. Which pin of PORTB toggles if the program receives character *Z'? [5 points] 4. The program uses polling method to receive data serially, re-write the code for interrupt-based receiving of data. Use Receive Complete Interrupt. [15 points] 1. // Problem 2 code #define F_CPU 16000000UL #include <avr/io.h> #include <avr/interrupt.h> void main(void) { char ch; UCSRA=0x00; UCSRB=0x58; UBRRH 0x00; UBRRL-OXOF; DDRB=0xFF; sei(); while (1) { if (UCSRA & 0x80) { ch - UDR; switch (ch) { } case 'a': case 'b': default: PORTB = PORTB^0x10; break; PORTBPORTB^0x20; break; PORTB = PORTB^0x40;
Expert Answer:
Answer rating: 100% (QA)
1 find Baud rate and time to send 1 byte formula of baud rate setting baudrate FCPU16UBRR1 UBRR15 gi... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Set the equation equal to zero and factor the left side. (s = 5) = 0
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
On January 1, 2018, the general ledger of Big Blast Fireworks includes the following account balances: The $30,000 beginning balance of inventory consists of 300 units, each costing $100. During...
-
An HCl molecule vibrates with a natural frequency of 8.1 1013 Hz. What is the difference in energy (in joules and electron volts) between successive values of the oscillation energy?
-
Which STOs have the same form as hydrogenlike AOs?
-
Two machines are used to fill cans. The machines are supposed to fill each can with 12 ounces of liquid. The amounts actually filled follow a normal distribution. A simple random sample of 10 cans is...
-
Rob Company purchases a 90% interest in Venus Company for $418,500 on January 1, 2013. Any excess of cost over book value is attributed to equipment, which is being depreciated over 20 years. Both...
-
Over a period of one year, PepsiCo stocks have a total percentage return of -3.25%, capital gains yield of -6.35%, and a current price of $68.98. How much dividends per share did PepsiCo pay during...
-
Bob Burley and his brother Buford ran the best restaurant in Dallas, Texas. Many out-of-towners would visit Dallas and go to Burleys Biscuits, Beef, and Veggies for a good wholesome meal. One thing...
-
Martin construction Limited incurs significant finance costs on its financing for the construction of supermarkets. Its chosen accounting policy to date has been to expense the finance costs as...
-
Determine if the following signals of time t in seconds are periodic. For periodic signals, find the fundamental angular frequency wo in rad/s and the fundamental period To in seconds. For...
-
Ximen Company produces a very special fine wine. Ximan company has the following information: Beginning Ending Inventory Inventory Raw Materials Inventory Work in Process Inventory Finished Goods...
-
Vaughn, Inc., manufactures clamps used in the overhead bin latches of several leading airplane models. Thomas Taylor, president of Vaughn, Inc., has gathered the following cost information from the...
-
Delicious Dave's Maple Syrup, a Vermont Corporation, has property in the following states: State Property Beginning Maine $ 923,032 Ending $ 994,221 Massachusetts Vermont $ 103,311 $ 203,109 New...
-
The economy will go into decline if taxes are too high. taxes must be too high. the economy is in decline since people are being laid off and the gross domestic product is going down. identify the...
-
Consider the table below showing return and risk for two investment funds. Mutual Funds Returns Standard Deviation Fund A : A well diversified stock fund 8% 17% Fund B: A risk-free fund consisting...
-
Research an article from an online source, such as The Economist, Wall Street Journal, Journal of Economic Perspectives, American Journal of Agricultural Economics, or another academic journal. The...
-
Rebecca and Walter Bunge have been married for 5 years. They live at 883 Scrub Brush Street, Apt. 52B, Las Vegas, NV 89125. Rebecca is a homemaker and Walt is a high school teacher. Rebecca's Social...
-
Patty Bayan is a single taxpayer living at 543 Space Drive, Houston, TX 77099. Her Social Security number is 466-33-1234. For 2012, Patty has no dependents, and her W-2 from her job at a local...
-
Russell (age 50) and Linda (age 45) Long have brought you the following information regarding their income and expenses for the current year. Russell owns and operates a landscaping business called...
-
A stirrer-container assembly contains a certain amount of fluid. The stirrer performs \(3 \mathrm{hp}\) work on the system. The heat developed by stirring is \(4000 \mathrm{~kJ} / \mathrm{h}\) and is...
-
Derive the mathematical expression of the first law of thermodynamics.
-
A system consisting of a gas confined in a cylinder undergoes a series of processes shown in Fig. 2.11. During the process A-1-B, \(70 \mathrm{~kJ}\) of heat is added while it does 45 \(\mathrm{kJ}\)...
Study smarter with the SolutionInn App