Professional Documents
Culture Documents
Microcontroller and Embedded System DE-42 Mechatronics: Lab Report Week 12
Microcontroller and Embedded System DE-42 Mechatronics: Lab Report Week 12
Microcontroller and Embedded System DE-42 Mechatronics: Lab Report Week 12
System
(MTS-311)
DE-42 Mechatronics
Syndicate –B
Introduction:
In serial communication, the data is sent one bit at a time, in contrast to parallel
communication, in which the data is sent a byte or more at a time. The 89C51 has
serial communication capability built into it.
TASK 1:
Code:
TASK 2:
In this task we are showing message “We love our country” at the baud rate of 5600. So firstly,
for baud rate we set TH=255 as it’s the value for baud rate done from calculations. Then we used
the lookup table at ORG 250H for entering our message. Here we are using data pointer and loop
so we can display every word in our message. Our program will run, and we will see our
message displaying “We love our country” continuously.
TASK 2:
We are providing 1 Hz external into pin T0 (P3.4) with 5V along rise and fall time of 500ms. We
have written a C program for counter 0 in mode 1 to display the seconds and minutes on P1 and
P2 respectively. The program is working and the result of program is being showed on proteus.
Code:
Proteus Simulation: