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 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
question
Computers and Technology, 24.06.2019 17:50
Acontact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. write a program that first takes in word pairs that consist of a name and a phone number (both strings). that list is followed by a name, and your program should output that name's phone number.
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
World Languages, 03.07.2019 21:10
question
Mathematics, 03.07.2019 21:10
Questions on the website: 13722363