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, 23.06.2019 04:40
The narrative structure of the popular movies can be broken down into
Answers: 3
question
Computers and Technology, 24.06.2019 00:30
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
question
Computers and Technology, 24.06.2019 07:40
What type of multimedia are live news feeds? live news feeds are examples of multimedia.
Answers: 2
question
Computers and Technology, 24.06.2019 13:10
Write a program that has a conversation with the user. the program must ask for both strings and numbers as input. the program must ask for at least 4 different inputs from the user. the program must reuse at least 3 inputs in what it displays on the screen. the program must perform some form of arithmetic operation on the numbers the user inputs. turn in your .py file as well as a screenshot of your program's output. include comments in your code to explain how it works an example program run might look like (have fun with this and be creative): ‘what is your name? ’ “josh” ‘, josh. what is your favorite color? ’ “green” ‘mine too. do you also like ice cream? ’ “no” ‘josh, how old are you? ’ “40” ‘ and how many siblings do you have? ’’ “3” ‘that means you are one of 4 kid(s). is green the favorite color of anyone else in your house? ’
Answers: 3
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
Mathematics, 17.03.2021 23:40
question
Mathematics, 17.03.2021 23:40
question
Mathematics, 17.03.2021 23:40
question
Mathematics, 17.03.2021 23:40
Questions on the website: 13722363