You should now explore and document the following: 1.
How can I watch a variable changing? 2. How can I watch the special
function registers (SFR)? What does the program counter do when I
step through my program? How does this relate to the program
memory? 3. How does my C-code translate into assembly code? Can I
simulate assembly commands? 4. Set the simulator to 16MHz (Project
Properties -> Simulator) and use the Stopwatch to measure how
long it takes to complete the while loop. 5. Can you work out how
long one instruction cycle takes? How long does the increment
command (i++) take? What is the relationship between the system
frequency of 64MHz and the cycle frequency of 16MHz? 6. Can you
write a for-loop or a function that takes exactly 50ms to complete?
Can you write a general-purpose delay function based on this? For
example, the function could have the following form: void
delay(unsigned int timeInMilliseconds); . Hint: Use the View menu
to find ways to observe your simulator states. Use the Debugger
menu to set your simulator frequency and to open the
stopwatch.
Nolan app
1. You can watch the variable changing by changing the value of the variable and changing the size of the variable by allowing the dynamic memory allocation for that variable and changing the memory size for the storing capacity of the variable in the program or you can simply make a variable that cannot exist outside an instance for example you create an variable for the for loop which means that the date variable will not be able to exist outside that for loop and you can use the same variable which makes the scenario of changing the variable possible .
Get Answers For Free
Most questions answered within 1 hours.