Exam 1 Flashcards

1
Q

How wide is Flash ROM?

A

16 Bits

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

How Wide is RAM?

A

8 bits

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

How wide is OPCODE?

A

16 bits

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

How many address lines are needed to address RAM which has 64k

A

16 lines

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

How many address lines are needed to address Program Flash ROM which has 64K

A

15 lines

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

BRCS

A

Branch if carry set

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

True or False: The target of a BRNE can be anywhere in the 4M word address space.

A

False, all conditional branches are short jumps (2 byte instructions) and must be within 64 bytes of PC

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

Size of long jmp

A

4 bytes

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

Size of rjmp

A

2 bytes

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

Size of ijmp

A

Stuffed into Z registers 2 bytes

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

True or False:The target address of a BRNE is forward if the relative address of the opcode IS negative.

A

Negative means backwards

Positive means forwards

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

How to find target location of Branching statement using the OPCODE

A

Target Location = PC + Bits 3-9 + 1

If negative number take 2s complement and then continue

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

CALL is a ____ byte instruction

A

4 byte

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

RCALL is a ____ byte instruction

A

2 byte

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

True or False: The RCALL target address can be anywhere in the 4M (word) address space?

A

False

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

True or False: The CALL target address can be anywhere in the 4M address space

A

True

17
Q

When CALL is executed, how many locations of the Stack are used?

A

2

18
Q

In AVR, which address is pushed into the Stack when the CALL instruction is executed?

A

The address of the next instruction immediately after the CALL instruction

19
Q

How to initialize Stack Pointer

A

LDI R17,HIGH(RAMEND)
OUT SPH,R17
LDI R17,LOW(RAMEND)
OUT SPH,R17

20
Q

How to set all pins for PortB

A

LDI R16,$FF
OUT DDRA,R16
OUT PORTB,R16
CBI DDRB, 0