Starting from:
$30

$24

HOMEWORK No. 6 Solution




NOTE: References for this topic are:




Textbook Chapter 10 through Section 10.1.4. Because the ATmega USARTS are so versatile, the modes of operation discussed in the remaining parts of Chapter 10 are beyond the scope of what we have covered in this course so far and may cause some confusion.



The Web tutorials we discussed in class and links to which are in the "Arduino & ATmega References" folder. These tutorials will fill in several gaps in Chapter 10 in the textbook, and you are responsible for the material in the tutorials.



The USART serial I/O hand-out pdf file in the "Arduino & ATmega References" folder.



------------------------------------------------------------------------------------------------------------------------------

NOTE: All programs must be handed in as printouts of Arduino Sketch files which have compiled without errors.




All Homework must be submitted as print outs from a text or WORD file. Complex equations and diagrams can be submitted as hand drawn figures (or scanned images) inserted in spaces in the print out. Please be sure to keep a copy of anything you submit for homework or Lab.




------------------------------------------------------------------------------------------------------------------------------




Determine the appropriate bit settings for UCSR0A, UCSR0B, UCSR0C,and UBRR0 to manage a serial interface using the following specific details:



– disable the multi-processor communication mode,




– turn off the RX complete interrupt, turn off the TX complete interrupt, turn off the data register empty interrupt, (In fact, turn off ALL USART0 interrupts.)

– turn on the receiver, turn on the transmitter,

– set the character size to 8 bits,

– use the asynchronous USART mode,

– use no parity,

– use 1 stop bit,

– set the baud rate to 115200 bits per second.




Create a function that initializes the USART based on the values determined in problem 1.



Write the three serial I/O functions defined in Lab 8.

More products