subject

Fix the broken c code. the program should blink the greenled every half second, but the red led is steadily lit. youmay not delete or add code, you may only change valuesbeing stored in a variable or register. time an iteration of the delay subroutine using the cpu timerand breakpoints.#include /* * fix this code! you may not delete or add code, you may only change values being stored in a variable or register. */void delay(); unsigned int cls(unsigned int x); unsigned int crs(unsigned int x); int main(void) { wdtctl = wdtpw | wdthold; volatile unsigned int m = 1; volatile unsigned int s = 0; volatile unsigned int p = 65535; p1dir |= m; while(s) { p = crs(p); p1out = p; delay(); }}void delay(){ volatile unsigned int i = 25; volatile unsigned int j = 0; volatile unsigned int k = 1; volatile unsigned int l = 0; for(; i > 0; { j += 2; k += 2; } l = cls(j + k); }unsigned int cls(unsigned int x){ return (x < < 1) | (x > > 15); }unsigned int crs(unsigned int x){ return (x > > 1) | (x < < 15); }

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:00
The use of idps sensors and analysis systems can be quite complex. one very common approach is to use an open source software program called running on an open source unix or linux system that can be managed and queried from a desktop computer using a client interface.
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
You know the right answer?
Fix the broken c code. the program should blink the greenled every half second, but the red led is s...
Questions
question
Computers and Technology, 04.11.2020 18:00
Questions on the website: 13722363