Question: 2. Write a new assembly language function, void wait1Second(void) that waits 1 second and then returns. Write a program, adding a call in main to

2. Write a new assembly language function, void wait1Second(void) that waits 1 second and then returns. Write a program, adding a call in main to call this function. Your function should contain one loop (not a loop in a loop as in waitMicroseconds()). You cannot call or use waitMicroseconds(). (Hint: it is not possible to use a large constant value with the MOV instruction, since the number of bits is quite small in the instruction. Use the LDR and .field methods used in class from the stop go C/asm mix example to store any large constants.) 3. Place a breakpoint and count event in the main() while loop. The grader will show you how to do this. You will need to create a breakpoint and add a count event once stopped. 4. Verify that the timing is within 100 clocks of 40,000,000 and the LED toggles every seconds.

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!