Configures the 8051 in one of the four baud rates by


Q. The UART of an 8051 is to be tested for serial communication at different baud rates (9600, 4800, 2400, 1200). A piece of wire is used to connect the Transmitter pin with the receiver pin. To test the serial communication link a test message ‘Testing serial link' is transmitted across the serial link. The message received on the receiver side is saved in RAM. At the end of the reception the original message and the received message are compared to confirm the working of the communication link.The communication link canbe tested at any baud rate by selecting any one of the four different baud rates with the help of four switches connected to port 1. Connecting any one of the four switches to logic ‘H' allows the corresponding baud rate to be configured.

Write an 8051 assembly code which does the following

- Configures the 8051 in one of the four baud rates by reading the Port 1 switch status.
- Transmits and receives the test message.
- Compares the transmitted and received message and turns on a green LED connected to P1.7 if there is no error and a red LED connected to P1.6 if there is an error.

202_Figure2.jpg

Solution Preview :

Prepared by a verified Expert
Other Engineering: Configures the 8051 in one of the four baud rates by
Reference No:- TGS02354717

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)