You are on page 1of 2

PRACTICE 3 (CS-22XX)

Objectives

• Practice control transfer instructions (jump, loop, and call instructions) in Keil

• Practice 8051 I/O port programming with Keil

• Creating various simulation projects with LEDs in Multisim

Related textbook chapters:

• Chapter 3: Jump, Loop, and Call Instructions (Week 2)

• Chapter 4: I/O Port programming (Week 3)

EXERCISE 1: 8-BIT BINARY COUNTING WITH LEDS

This is a design problem, meaning that no step-by-step guidance is given to you, only the
expected outcome and some performance specifications or requirements to the program code.

Write an Assembly language program in Keil that will perform an 8-bit counting-up process
(from 00000000 to 11111111) with 8 LEDs in Multisim as shown below (notice the “pull-down”
connection of LEDs):

1
In your program code, you must have some delay between each binary number. You can use
the delay subroutine from your previous practice assignments. The main part of the program
should repeat itself from the beginning when your counter reaches 11111111 value. So, it will
start the counting process again from 00000000. Also, the counting process must be
implemented using a loop where you increment the value you send to Port 2 (do not hard code
256 lines of code). The final performance should be similar to the one shown on the
supplementary video to this manual. You will have to make a full-screen recording of your
simulation circuit in Multisim as well to receive a grade for this exercise. As usual, submit all
the Keil project files with a well-commented code, as well as simulation project files from
Multisim.

DELIVERABLES FOR GRADING OF PRACTICAL ASSIGNMENT 3:

• Submit your “Lab3Ex1” project folder with all internal subfolders.

• It must contain ALL Keil and Multisim related subfolders that you created while doing this
practical assignment separated into subfolders for each exercise.

• It must contain a short video showing your simulation in operation. You video has to be
small in size as the limitation of the files that you can upload to Moodle is only 40 MB.

• Zip this folder and submit it to Moodle to a dedicated submission box for Practice 3.

You might also like