Question
1. Find the size of the delay of the code snippet below if the crystal frequency is 4MHz. R2 equ 0x07 R3 equ 0x08 Delay
1. Find the size of the delay of the code snippet below if the crystal frequency is 4MHz.
R2 equ 0x07
R3 equ 0x08
Delay
MOVLW 200
MOVWF R2
AGAIN
MOVLW 250
MOVWF R3
HERE
NOP
NOP DECF R3, F
BNZ HERE
DECF R2, F
BNZ AGAIN RETURN
2. Find the number of times the following loop is performed:
REGA equ 0x20
REGB equ 0x30
...
MOVLW 200
MOVWF REGA
BACK MOVLW 100
MOVWF REGB
HERE DECF REGB,F
BNZ HERE
DECF REGA, F
BNZ BACK
3. Find the oscillator frequency if the instruction cycle =1.25us.
4. Find the instruction cycle if the crystal frequency is 20MHz.
5. Write a macro that divides a number by any number in power of two and stores the result in the memory location.
6. Store the following array of numbers in the program memory starting at 0x200 and then add them together and store the result in the data memory 0x20 and 0x21. Array db 0x02, 0x14, 0x30, 0x34, 0xA1, 0x00, 0xBD, 0x57,0x99,0xFF
7. Write a program that generates a one-second delay.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started