prepare a program to transfer a string of data from program memory starting at address $200 to RAM locations inside CPU starting at $140. The data representing your last name and first name is as shown below:
MYDATA: .DB "firstnameLastname", 0 Using the simulator, single-step through program and examine data transfer and registers.
Add following subroutine to a program in Activity 1, single-step through subroutine and examine RAM locations:
Subroutine: After data has been transferred from program memory into RAM, the subroutine must copy data from RAM locations starting at $140 to RAM locations starting at $160.
prepare the program to compute y where y = x^2 + 2x + 9. x is between 0 and 9 and look-up table for x2 is located at the address (program memory) of $200. Register R20 has the x, and at the end of the program R21 must have y. Use simulator to change the x value and single-step through the program, examining the registers as you go.
Connect the Switch to the pin on one of the PORTs and the LED to another pin. prepare and test the program with the following components:
a) The LED toggles when switch is pressed.
b) Store last state of the LED in EEPROM so that, if microcontroller powers off, it restores its last state when it powers on, again.