0% found this document useful (0 votes)
9 views

Lab 4C Making An Up-Counter On Mde8051: Lab Manual For "The 8051 Microcontroller ."

This document describes three activities for creating an up-counter on an MDE8051 trainer: 1. The first activity has the student write a program to count up in binary on the trainer's LEDs. It instructs them to change the time delay between counts so the LEDs are observable. 2. The second activity modifies the previous program to set the maximum count to 10 instead of 255. It then has them change the maximum to their age. 3. The third activity uses the trainer's DIP switches to set the maximum count for an up-counter, inputting the value through the switches.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lab 4C Making An Up-Counter On Mde8051: Lab Manual For "The 8051 Microcontroller ."

This document describes three activities for creating an up-counter on an MDE8051 trainer: 1. The first activity has the student write a program to count up in binary on the trainer's LEDs. It instructs them to change the time delay between counts so the LEDs are observable. 2. The second activity modifies the previous program to set the maximum count to 10 instead of 255. It then has them change the maximum to their age. 3. The third activity uses the trainer's DIP switches to set the maximum count for an up-counter, inputting the value through the switches.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

LAB 4C

MAKING AN UP-COUNTER ON MDE8051


OBJECTIVE:
To create an up-counter on MDE8051 trainer.
REFERENCE:
Mazidi and McKinlay, The 8051 Microcontroller , Chapters 3 and 4
MATERIALS:
MDE8051 Trainer
8051 Keil Assembler
ACTIVITY 1
In many systems such as copier we use up-counter to keep track of an
action. Write and test a program to count up in binary on your 8051
Trainer. Make sure you do this lab after you have done Labs 4A and
Lab4B.
Change the time delay in between the counts. Make sure the time
delay is long enough that you can observe the LED counting up.
ACTIVITY 2
In Activity 1, the maximum count was FFhex(or 255). Modify the above
program to set maximum count to 10 (00001010).
Change the maximum count to the value of your age and observe the
LED counting up to that number.
ACTIVITY 3
In this activity, use DIP switches to set the maximum count. Use the
DIP switches on 8051 Trainer to set the maximum count for an up-counter.

Lab Manual for The 8051 Microcontroller .

LAB 4C
WORKSHEET
Name:

Date:

Class:

1. What is maximum count for register A?

2. In this Lab, which port was used to display the count? Which one was
used to set the maximum count? Can we use one port for both (inputting
the maximum count and displaying the count)?

3. In this Lab, you can use CJNE (Compare Jump Not Equal) instruction.
Explain how it works.

4. In 8051, Do we have CJE(compare jump equal) instruction?

5. Is this a valid instruction? CJNE A, P2, OVER

Lab Manual for The 8051 Microcontroller .

LAB 4C
MAKING AN UP-COUNTER ON MDE8051

Lab Manual for The 8051 Microcontroller .

You might also like