嵌入式系统代写代做代考 Embedded Systems Tutorial questions 2

Tutorial questions 2
1. An asynchronous communication link sends a 4096 bit file over an RS232 link using 19200 8-E-2 format.
a) Calculate how long the file takes to send.
b) Calculate the overhead associated with the protocol (i.e. the number of non-data bits sent
divided by the total number of bits sent).
2. The letter ‘A’ has the ASCII code 0x41. Show the complete word that would be used to send this character over a serial port link using the 7-O-2 format, sending least significant bit first.
3. A simple condition monitoring system based around a microcontroller which draws the following typical currents:
 100 nA in sleep mode
 20 mA in active mode
The device is in active mode when taking and recording measurements and is in sleep mode the rest of the time. The system must operate for at least 10 weeks without battery change when powered from a 5V battery of capacity 1500 mAh. What percentage of the time must the device be in sleep mode to fit within the available power budget?
4. Consider the following assembly code running on an 8-bit processor (registers and ALU are 8 bits wide).
LOAD 0x01 into R1 LOAD 0x02 into R2 R3 = R1-R2
What is the resulting value in register R3?
What is the resulting value of the status flags V, N and Z?
5. Given the following UART Baud Rate table from a ATmega 328P microcontroller, and assuming that you are using 8 MHz fosc in Asynchronous Normal mode, calculate the required values for UBRRH and UBRRL and the baud rate error when your desired baud rate is 28800.