0% found this document useful (0 votes)
65 views3 pages

8051 Lab4A

The document describes an activity to test the ports of an 8051 microcontroller trainer board by downloading and running a sample program that toggles LEDs connected to port P2. It provides instructions on assembling and downloading the sample program using the 8051 assembler and downloader tool. The program causes the LEDs to toggle on and off to test the functionality of the port pins, and the timing of the toggling can be adjusted by changing a register value or adding NOP instructions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views3 pages

8051 Lab4A

The document describes an activity to test the ports of an 8051 microcontroller trainer board by downloading and running a sample program that toggles LEDs connected to port P2. It provides instructions on assembling and downloading the sample program using the 8051 assembler and downloader tool. The program causes the LEDs to toggle on and off to test the functionality of the port pins, and the timing of the toggling can be adjusted by changing a register value or adding NOP instructions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

LAB 4A

8051 TRAINER TEST & DOWNLOADING PROGRAM


OBJECTIVE:
To toggle and test the 8051 Trainer and its ports.
REFERENCE:
Mazidi and McKinlay, The 8051 Microcontroller, Chapters 3 and 4
www.MicroDigitalEd.com
MATERIALS:
MDE8051 Trainer
8051 Keil Assembler
MDE8051 Download Tutorial from the following site:
http://www.microdigitaled.com/8051/Software/8051_tools.htm
You can buy the MDE8051 Trainer from vendors shown on
www.MicroDigitalEd.com. We will use this 8051 Trainer in all subsequent
labs. The user guide and tutorial is available on the above site. It shows how
to connect the 8051 Trainer to the x86 PC and make sure the trainer boots
up. After that you are ready to download a toggle program shown in the
activity 1.
ACTIVITY 1
To test the operation of the ports of your MDE8051 Trainer you can use
the Toggling LEDs on P2 program from
http://www.microdigitaled.com/8051/Hardware/sample.htm
A) For you Assembler, make sure the hex option in the Link is checked
so the hex file for the above program is produced. Check the
directory of your file to make sure you have asm, lst and hex files
for the program.
B) Now, follow the steps shown in the tutorial to download the hex file
into the 8051 Trainer.
C) Move the Slide Switch to RUN position and press the reset button
to run the test program.
D) Use a wire to connect the LED to each pin of the P1 and P2 and
observe the LED toggles on and off.
The above test program toggles the P2 of the 8051. Use a logic probe
or the LEDs of the 8051 Trainer to watch the bits of the ports toggle on and
off. To change the time delay in between the "on" and "off" states change
the value of R5 register (or increase the number of NOP) but make sure the
time delay is long enough that you can observe the LED going on and off.
Lab Manual for The 8051 Microcontroller.

LAB 4A
WORKSHEET

Name:

Date:

Class:

1. List all ports of 8051

2. In this Lab, which ports were tested?

3. Give the pins of P3 used for TxD and RxD.

4. Which ports of the 8051 have internal pull-up resistors?

5. Which ports of the 8051 require the connection of external pull-up


resistors in order to be
used for I/O?

6. Upon reset, all ports of the 8051 are configured as _____________ (output,
input).

Lab Manual for The 8051 Microcontroller .

LAB 4A
8051 TRAINER TEST & DOWNLOADING PROGRAM

Lab Manual for The 8051 Microcontroller.

You might also like