Question: i have a practice problem where we have to create an assembly language program. This involves setting up a DIP switch and then to activate

i have a practice problem where we have to create an assembly language program. This involves setting up a DIP switch and then to activate the LEDs on the Dragon 12 light board. The problem I am having is to implement the instruction where I have to set up switch 1 and 8. Can you provide an example of the instructions using the Code Warrior shell text (see below) as a guideline?

I use the HCS12 Microcontrollers and Embedded Systems as a reference.

1. When both DIP switches #8 and #1 are high, turn on all LEDs.

2. When both DIP switches #8 and #1 are low, turn off all LEDs

3. When DIP switch #8 is high and #1 is low, turn on all the even numbered LEDs.

4. When DIP switch #1 is high and #8 is low, turn on all the odd numbered LEDs.

5. Your program must to read DIP switches and turn on/off corresponding LRDs continuously until a Reset.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!