Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part One: UART Init and send string 1. Assign the pins to the UART (and not general-purpose I/O) by writing 0x55 to PUAPAR. 2. Write

image text in transcribed

Part One: UART Init and "send string" 1. Assign the pins to the UART (and not general-purpose I/O) by writing 0x55 to PUAPAR. 2. Write 0x17 or Ox13 to UMR10 and write 0x07 to UMR20. This sets up the UART for 8 data bits, no parity, and 1 stop bit 3. Write 0 to UBG10 and 62 (62 decimal) to UBG20. These are the divisors needed for a 19200 baud rate. 4. Write 0x05 to UCRO to enable both the transmitter and receiver. You should now be ready to transmit 5. Transmit a single character by writing it to UTB0. At this point you should be able to see the character 6. To send a complete string, you need to poll bit 2 of USRO to see when the UART is ready for the next and receive in Hyperterm for debugging purposes (see below for Hyperterm settings) character. (For example, you can read USRO into a variable and AND it with 0x04. The result is 0 if the UART is not ready for another character and non-zero if it is ready.) 7. To send a string, you need to do this. Send one character to "jump-start" the process. Check to make sure the next character in the string is not NULL. If it is NULL you are finished If it is not NULL, poll USRO until the status bit is non-zero Write the next character to UTB0 Increment to the next character and iterate. 8. You can observe by connecting the serial port to the PC. As you will notice, it needs to be set on 19200 9. Demonstrate this to the instructor. 8-no parity-1-None in Hyperterm Part One: UART Init and "send string" 1. Assign the pins to the UART (and not general-purpose I/O) by writing 0x55 to PUAPAR. 2. Write 0x17 or Ox13 to UMR10 and write 0x07 to UMR20. This sets up the UART for 8 data bits, no parity, and 1 stop bit 3. Write 0 to UBG10 and 62 (62 decimal) to UBG20. These are the divisors needed for a 19200 baud rate. 4. Write 0x05 to UCRO to enable both the transmitter and receiver. You should now be ready to transmit 5. Transmit a single character by writing it to UTB0. At this point you should be able to see the character 6. To send a complete string, you need to poll bit 2 of USRO to see when the UART is ready for the next and receive in Hyperterm for debugging purposes (see below for Hyperterm settings) character. (For example, you can read USRO into a variable and AND it with 0x04. The result is 0 if the UART is not ready for another character and non-zero if it is ready.) 7. To send a string, you need to do this. Send one character to "jump-start" the process. Check to make sure the next character in the string is not NULL. If it is NULL you are finished If it is not NULL, poll USRO until the status bit is non-zero Write the next character to UTB0 Increment to the next character and iterate. 8. You can observe by connecting the serial port to the PC. As you will notice, it needs to be set on 19200 9. Demonstrate this to the instructor. 8-no parity-1-None in Hyperterm

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions