Homework 6 Solution

The ascii value of 7 is 0x37 and 0b00110111 the lsb

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a character ‘A’ at 57,600 baud rate (see the example on slide 4, week 6). The sketch should show the bit durations in microseconds, in addition to the waveform. The frame format is of 1 start bit, 8 data bits, an even parity bit, and 1 stop bits. The ASCII value of ‘7’ is 0x37 and 0b00110111. The LSB is sent first, so the frame format is S11101100ss, where S is the start bit and s is a stop bit. It is close to slide 4 of week 6 except that there are two stop bits. Question 2: USART Programming (20pts) You are asked to program an ATmega128 so that it plays as a one- way USART reply node from USART0 to USART1: Any character received by USART0 should be transmitted through USART1 to the outside. The program must be interrupt- based, so the microcontroller can do other work. a. [10] Assume the ATmega128 runs at 16MHz. Write a USART_init() function to initialize bot...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online