Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started