CH3 Review Questions Flashcards
(24 cards)
The mnemonic BRNE stands for ________.
Branch if not equal
True or False.
“BRNE BACK” makes its decision based on the last instruction affecting the Z flag.
True
“BRNE HERE” is a ____-byte instruction.
2
In “BREQ NEXT”, which register’s content is checked to see if it is zero?
Z flag of SREG
JMP is a(n) ___-byte instruction.
4
True or False.
In the AVR, control can be transferred anywhere within the 4M of code space by using the CALL instruction.
True.
The CALL instruction is a(n) ___-byte instruction.
4
True or False.
In the AVR, control can be transferred anywhere within the 4M of code space by using the RCALL instruction.
False.
With each CALL instruction, the stack pointer register,SP, is _________.
(incremented or decremented)
Decremented
With each RET instruction, the SP is ______.
(incremented or decremented)
Incremented
On power-up, the SP points to address______.
0
How deep is the size of the stack in the AVR?
The AVR’s stack can be as big as its RAM memory.
The RCALL instruction is a(n) ____-byte instruction.
2
______ takes more ROM space.
(RCALL or CALL)
CALL
True or False.
In the AVR, the machine cycle lasts 1 clock period of the crystal frequency.
True
The minimum number of machine cycles needed to excute an AVR instruction is____.
1
The maximum number of cycles needed to execute an AVR instruction and for which instructions?
4; CALL, RET
Find the machine cycle for a crystal frequency of 12 MHz.
12MHz/4 = 3MHz
MC=1/3MHz = 0.333µs
Assuming a crystal frequency of 1 MHz, find the time delay associated with the loop section of the following DELAY subroutine:
DELAY: LDI R20,100
HERE: NOP
NOP
NOP
NOP
NOP
DEC R20
BRNE HERE
RET
[100x (1+1+1+1+1+1+2)]x 1µs=800µs=0.8ms
True or False.
In the AVR, the machine cycle lasts 6 clock periods of the crystal frequency/
False; it takes 4 clock cycles
Find the machine cycle for an AVR if the crystal frequency is 8 MHz.
MC= 1/8MHz=0.125µs=125ns
True or False.
In the AVR, the instruction fetching and execution are done at the same time.
True
True or False.
JMP and RCALL will always take 3 machine cycles.
True.
True or False.
The BRNE instruction will always take 2 machine cycles.
False; Only if it branches to the target address.