Question: Determine the register settings for the following: Initialize the serial port for use - Use Port UC serial port (Port 2) - Desired baud rate:

Determine the register settings for the following:

Initialize the serial port for use

- Use Port UC serial port (Port 2)

- Desired baud rate: 9600 baud

- 8 data bits, 1 stop bit, no parity

- Enable both transmit and receive

- Assume clock source is a 30 MHz fsys

- Consider the following registers: PUCPAR, UCR2, UMR12, UMR22, UCSR2, UBG12, UBG22

- Write one line of C code to initialize each of the listed registers. (It is OK to use syntax like PUCPAR = 0x02;)

After the registers are initialized, the port is ready to receive data:

Write a while loop to poll to wait until the port has received 1 character and, when it has a character, read it into a variable named nextchar

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!