Lab 4 Hints

Lab 4 Hints - Lab assignments: 1). Connect your...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab assignments: 1). Connect your microcontroller board with a PC (see the appendix for instructions on connections and setup). Program your microcontroller to use the polling method to wait for the data to become available, which is sent by your PC through a hyper-terminal. Then the microcontroller echoes it back via transmitter but with a little modification, i.e., if you type "A" on the PC’s keyboard and send it to the microcontroller through a serial port, the microcontroller will send you back "[A]", that is input data but surrounded by square brackets. Part 1 mostly requires revision of the sample code. All the necessary functions are there, however you need to check all the register names and their values to ensure the microcontroller is programmed the way you want. When you initialize the USART, you need to make sure the conditions match those that you setup for hyperterminal (baud rate, number of data bits, stop bits, parity, asynchronous operation). Polling simply means you continuously check a value, in this case you can continuously call the USART_Receive function and check to see if there is nonzero data there. If so, reply as directed. 2). Implement the same function as assignment 1), but use interrupts rather than polling method. You need to look up the interrupt vector list (given in lab 2 and lecture 3, there are 28 in total), find the corresponding interrupt vectors for USART (vector 21, 22, 23 for USART0_RX, USART0_UDRE, USART0_TX, respectively), and set up the interrupt service routine. Part 2 is a fairly simple extension of part 1.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/21/2011 for the course ECE 3411 taught by Professor Park during the Fall '11 term at UConn.

Page1 / 2

Lab 4 Hints - Lab assignments: 1). Connect your...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online