ASSIGNMENT DESCRIPTION
PART 1
Write an assembly language code segment to insert into the main.asm file that takes an input controlled by a potentionmeter, converts that input to a digital value, and displays that value on the LEDs according to the following:
TABLE 8-1: LED Conditions
Value
|
LEDs Lit
|
$0000 - $3332
|
none
|
$3333 - $6665
|
1
|
$6666 - $9998
|
1,2
|
$9999 - $CCCB
|
1,2,3
|
$CCCC - $FFFF
|
1,2,3,4
|
PART 2
Modify your code by replacing "ATD0DR1" with "ATD0DR0." Slowly move your hand over the CSM12D module to cast a shadow on the board. Observe the reaction of your display LEDs to different brightness levels.
Objectives:
(1) Study how to program in Assembly Language while using CodeWarrior and the PBMCUSLK and CSM12D modules.
(2) Practice controlling peripheral devices with a microcontroller.