Question: 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

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

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

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!