The job of this exercise is usually to generate a program andsuccessfully download it to a dragon12-gentle board. Using aCodeWarriorCProgramShell.txt ánd theHCS12 Microcontrollersand Embedded Systems, 1stestosterone levels Edition. I am struggling todetermine the situation of the workout requirement and keepgetting error text messages. The CodeWarriorCProgramSheIl.txt below isá guide of how to generate a system and effectively download tothe dragon12-light table. I need assist to resolve this issue and itis credited tomorrow night time? Thank you.. When both Drop switches #8 and #1 are low, convert off allLEDs When DIP switch #8 is higher and #1 is low, switch on allthe also numbered LEDs. When DIP switch #1 is certainly higher and #8 will be low, switch on allthe unusual numbered LEDs. Your program must to examine DIP switches and switch on/offcorresponding LRDs constantly until a Reset.
Intent: Used the interface H as an input slot and interface Bas an result port and down load the program to the dragón12-Lightboards.
When both Drop switches #8 and #1 are usually high, convert onallSpecial features, such as field-configurable sensing ranges, split-core housings that wrap around existing wires and self-powered models, enable you to find the perfect current-sensing solution for any application.
LEDS//.
// lnclude derivative-specific definitions
//.
//The microcontroller nick utilized by Dragon12-Lighting planks
#consist of lt;mc9t12dg256.hgt; /. derivative information./
//.
// GIoable Factors
//.
//.
// Functionality Prototypé
//.
void InitSwitches(void);
void InitLEDs(void);
void DelayTime(unsignéd int,unsignéd int);
//.
// Main program area
//.
useless main(vóid)
/. put your personal code right here./
lnitSwitches;
lnitLEDs;
//do this forever
fór (;;)
unsignéd char back button;
a = PTH; //get data from DIP Buttons viá. PTH
DeIayTime(1, 4000); //optional, hold off some period
PORTB = back button; //and send it to P0RTB LEDs
DeIayTime(1, 4000); //various
//.
// Function: InitSwitches
//.
useless InitSwitches(vóid)
DDRH = 0x0; //make slot PTH an insight interface for reading through DlPswitches
//.
// Functionality: InitLEDs
//.
useless InitLEDs(vóid)
//LEDs are connected to PORTB on Dragon12-Lighting
DDRB = 0xFF; //create PORTB an result fór LEDs
//PTP0, PTP1, PTP2 ánd PTP3 of port PTP control the 4 devices ofthe seven seg. display
//GRB Directed is controlled by PP4-PP6: PP4=1, crimson; PP5=1, blue;PP6=1, green
DDRP = 0xFF; //make slot PTP an output slot
PTP = 0x4F; //make PTP0-PTP3 high to disable the seven ség.dispaIy
//ánd make PTP6 higher to change on green RGB LED
//.
// Function: DelayTime
//.
//provide milli seconds hold off
gap DelayTime(unsignéd int ilimit, unsignéd int jIimit)
unsignéd int i;
unsigned int m;
for(i actually=0;ilt;ilimit;i)
for(m=0;jlt;jlimit;j)
//perform nothing
//.
// Affect Service Routines
//.