Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Problem 1: Analyze the following code to determine the sequences of lighting of LEDs on the Dragon 12-Plus microcontroller board. Provide the sequences in

image text in transcribedimage text in transcribed

Lab Problem 1: Analyze the following code to determine the sequences of lighting of LEDs on the Dragon 12-Plus microcontroller board. Provide the sequences in order and some explanation of why specific LEDs turn ON. In the following code, we are working only with LEDs 21 and 0. Verify the operation of the code by entering CodeWarrior via "Load Example Project" and working with Debug Instruments under "Full Chip Simulation mode. [10+15 points) PORTRET=1 PII LED R +5V IM PORTB-1 +5V Cure DW LED R P/10 OV Figure 1.2 Turning on an LED // Modified LBE Example 1b: Turning on sequences of LEDs #include /* common defines and macros */ #include /* derivative information / #pragma LINK_INFO DERIVATIVE "mc9s12dg256b" #include "main_asm.h" /* interface to the assembly module +/ #define NUMDISP 4 void delay(void) void main(void) { int i; // Loop counter char disp [NUMDISP] = {0x01, 0x03, 0x05, 0x07); PLL_init(); // set system clock frequency to 24 MHz led_enable(); seg7_disable(); while (1) for (i=0; i /* common defines and macros */ #include /* derivative information / #pragma LINK_INFO DERIVATIVE "mc9s12dg256b" #include "main_asm.h" /* interface to the assembly module +/ #define NUMDISP 4 void delay(void) void main(void) { int i; // Loop counter char disp [NUMDISP] = {0x01, 0x03, 0x05, 0x07); PLL_init(); // set system clock frequency to 24 MHz led_enable(); seg7_disable(); while (1) for (i=0; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Question What are the requirements for a SIMPLE 401(k) plan?

Answered: 1 week ago

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago