Question: i want someone to write the code for me in C MHz, there are 16,000 bus clock cycles in 1 ms. You need to know

 i want someone to write the code for me in C
i want someone to write the code for me in C

MHz, there are 16,000 bus clock cycles in 1 ms. You need to know how long it takes to execute the loop once, then determine the number of times you need to execute the loop to create the 1 ms delay. E.g, if the time to execute the loop once is 4 cycles, then executing the loop 4000 times will be about 1 ms. In this simple estimation we are neglected the other instructions not inside the loop, because they are 4000 times less important Part b) Write a main program in C that implements the input/output system. Pseudo code and flowchart are shown, illustrating the basic steps for the system. We recommend at this early stage of your design career you access the entire I/O port using GPIO PORTF_DATA_R. After you fully understand how to work, then you can use bit-specific addressing to access I/O ports main Turn on the clock for Port F Set the Port F direction register 30 man PF4 is an input and PF2 is an output Initialize Enable the PF4 and PF2 bits in the Port F DEN register ports Set bit 4 in Port F PUR register so it will run on the real board Set PF2 so the LED in ON LED on loop Delay about Ims Read the switch and test if the switch is pressed If PF4-0 (the switch is pressed), toggle PF2 (flip bit from 0 to 1, or from 1 to 0) If PF4-1 (the switch is not pressed). Not pressed Pressed Start set PF2, so LED IS ON Go to loop LED on LED toggle Delay 09/13/20

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!