CH3 Review Questions Flashcards

1
Q

The mnemonic BRNE stands for ________.

A

Branch if not equal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False.

“BRNE BACK” makes its decision based on the last instruction affecting the Z flag.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

“BRNE HERE” is a ____-byte instruction.

A

2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In “BREQ NEXT”, which register’s content is checked to see if it is zero?

A

Z flag of SREG

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

JMP is a(n) ___-byte instruction.

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or False.

In the AVR, control can be transferred anywhere within the 4M of code space by using the CALL instruction.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The CALL instruction is a(n) ___-byte instruction.

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False.

In the AVR, control can be transferred anywhere within the 4M of code space by using the RCALL instruction.

A

False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

With each CALL instruction, the stack pointer register,SP, is _________.

(incremented or decremented)

A

Decremented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

With each RET instruction, the SP is ______.

(incremented or decremented)

A

Incremented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

On power-up, the SP points to address______.

A

0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How deep is the size of the stack in the AVR?

A

The AVR’s stack can be as big as its RAM memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The RCALL instruction is a(n) ____-byte instruction.

A

2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

______ takes more ROM space.

(RCALL or CALL)

A

CALL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True or False.

In the AVR, the machine cycle lasts 1 clock period of the crystal frequency.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The minimum number of machine cycles needed to excute an AVR instruction is____.

A

1

17
Q

The maximum number of cycles needed to execute an AVR instruction and for which instructions?

A

4; CALL, RET

18
Q

Find the machine cycle for a crystal frequency of 12 MHz.

A

12MHz/4 = 3MHz

MC=1/3MHz = 0.333µs

19
Q

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

A

[100x (1+1+1+1+1+1+2)]x 1µs=800µs=0.8ms

20
Q

True or False.

In the AVR, the machine cycle lasts 6 clock periods of the crystal frequency/

A

False; it takes 4 clock cycles

21
Q

Find the machine cycle for an AVR if the crystal frequency is 8 MHz.

A

MC= 1/8MHz=0.125µs=125ns

22
Q

True or False.

In the AVR, the instruction fetching and execution are done at the same time.

A

True

23
Q

True or False.

JMP and RCALL will always take 3 machine cycles.

A

True.

24
Q

True or False.

The BRNE instruction will always take 2 machine cycles.

A

False; Only if it branches to the target address.