Question: Objective of my assignment is to execute a program in CodeWarrior software. I was able to create a coding that represents the conditions of given

Objective of my assignment is to execute a program in CodeWarrior software. I was able to create a coding that represents the conditions of given goals and instruction, but I keep getting a minor error that is preventing me complete this exercise. I need help to solve this issue, and it is due today? Thank you

Goal: To become familiar with branch instructions, loops, using port H as an input port and port B as an output port, using dragon12-Light boards

When both DIP switches #8 and #1 are high, turn on all LEDs.

When both DIP switches #8 and #1 are low, turn off all LEDs

When DIP switch #8 is high and #1 is low, turn on all the even numbered LEDs.

When DIP switch #1 is high and #8 is low, turn on all the odd numbered LEDs.

Your program must to read DIP switches and turn on/off corresponding LEDs continuously until a Reset.

Note 1: The DIP switches on the boards are numbered 12345678 for bits 76543210.

Note 2: DIP switches are connected to port H, and LEDs are connected to port B.

Objective of my assignment is to execute a program in CodeWarrior software.

I was able to create a coding that represents the conditions of

Error: C2801:''missing main.c line 55 Error : c2801: '' missing b )-M. Path: C:\Users gailsmart52gmail.com Documents untLabonet Sources main.c Include derivative-specific definitions The microcontroller chip used by Dragon12-Light boards #include /*derivative information/ Gloable Variables Function Prototype void InitSwitches (void) void InitLEDs (void) void Delaylime(unsigned 1nt, unsigned int): Hain program section void main(void) * put your own code here* InitSwitches() InitLEDs() /do this forever for ) unsigned char x //get data from DIP Switches via. PTH PORTB=0, //Turn on a11 LEDs if((!O)&&(0))t PORTB- Oxff: //Turn off all LEDs if ((1)&&0) PORTB- Oxaa: /Turn on all even LEDs if ((1)&10)) PORTB+0x55, //Turn on all odd LEDs DelayTime(1. 4000) //optional, delay some time PORTB = x; //and send it to PORTB LEDs DelayTime(1. 4000) //optional Function InitSwitches

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!