Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

3. Sending the Switch Settings to the LEDs 1. In Code Warrior, create a new project named Lab05Switches ToLEDs, again choosing HCS12 Serial Monitor instead

image text in transcribed
3. Sending the Switch Settings to the LEDs 1. In Code Warrior, create a new project named Lab05Switches ToLEDs, again choosing HCS12 Serial Monitor instead of Full Chip Simulation on the New Project Wizard's first page. 2. Open your project's main.c file and delete contents of the loop in function main. 3. Write a program that lets you use the eight DIP switches on the Dragon 12 board to turn on or off the corresponding LEDs. For example, when you turn on switch #4, LED #4 should light up. Here are some hints: . For the LEDs to work, you'll have to configure Port B and bit 1 of Port Jin exactly the same way that the previous program did. Since this program also uses the switches, you'll have to configure Port H properly. You won't need a Delay function, since we want the LEDs to respond immediately when we flip a switch. . The main portion of your program will be a forever" loop in which you setting of the switches, send that setting to the LEDs, and then repe 4. Compile the program and use Code Warrior's debugger to run it. When it 3. Sending the Switch Settings to the LEDs 1. In Code Warrior, create a new project named Lab05Switches ToLEDs, again choosing HCS12 Serial Monitor instead of Full Chip Simulation on the New Project Wizard's first page. 2. Open your project's main.c file and delete contents of the loop in function main. 3. Write a program that lets you use the eight DIP switches on the Dragon 12 board to turn on or off the corresponding LEDs. For example, when you turn on switch #4, LED #4 should light up. Here are some hints: . For the LEDs to work, you'll have to configure Port B and bit 1 of Port Jin exactly the same way that the previous program did. Since this program also uses the switches, you'll have to configure Port H properly. You won't need a Delay function, since we want the LEDs to respond immediately when we flip a switch. . The main portion of your program will be a forever" loop in which you setting of the switches, send that setting to the LEDs, and then repe 4. Compile the program and use Code Warrior's debugger to run it. When it

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions