Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Winter 2021

ECE 3720
Prof. Shadi G. Alawneh
Deadline It based on your section (Monday: Feb 15, Tue: Feb 16, Thr: Feb 18, Fri: Feb 19)
Lab# 3
HCS12 Parallel I/O Ports Programming in Assembly Language
---------------------------------------------------------------------------------------------------------------------
Objectives
• Using HCS12 Parallel I/O Ports to read/write data from external I/O devices

Use your Dragon12-Light (or Dragon12-Plus2) Evaluation Board and the CodeWarrior IDE to
develop the following programs

0. Make sure you understand how the Reset button is used for Loading or Running your
program depending on the SW7 position (LOAD/RUN)
Make sure you understand how the serial monitor sets the E-Clock to be 24MHz if you run
your programs from the debug dialog. If SW7 is on the RUN mode, then after resetting your
board, the E-Clock will be 4MHz.
Make sure you refer to the board manuals posted on Moodle for all needed hardware
connections between I/O devices on the board and the HCS12 pins. Refer to Table 1.1 for
I/O pins usage and to chapter 4 for hardware descriptions in your board user manual (The
schematic manuals show all hardware connections for more details)

1. The board has RGB LED. Write a program that cycles through the 8 different colors that you
get by mixing the Red, Green, & Blue. Use a delay of 500ms between them.

2. Write a program that implements an 8 bit up counter on the 8 LEDs. Increment the counter
every second.

3. Write a program that displays -OU- on the four 7 segment displays repeatedly. You will
need to use the multiplexing technique on the 4 displays in this part.

4. Write a program that generates a noise of 500Hz on the speaker on your board.
You are required to do the following:
1. Demonstrate your working solution to your TAs
2. Turn in a lab report to your TA which includes:
a. This sheet signed by your TA
b. Printed source code for all parts
c. Answers to questions & print of screenshots (if any)

TA Signature and Date:

Part 1: _________________________

Part 2: _________________________

Part 3: _________________________

Part 4: _________________________

You might also like