AVR Microcontroller mcq

 AVR Microcontroller

Architecture

1. Is the following instruction correct LDI R3,50?

a) Yes

b) No

c) Cant be said

d) None of the mentioned

Answer: No

2. Registers R0-R31 are used for what type of works?

a) they are used for arithmetic and logic instructions

b) they are used for data copy

c) they are used for calculations

d) none of the mentioned

Answer: they are used for arithmetic and logic instructions

3. The largest value that can be loaded in an 8 bit register is?

a) 11111111H

b) FH

c) FFH

d) 00H

Answer: FFH

4. The total space for the data memory available in the AVR based microcontroller is?

a) FFH

b) FFFH

c) FFFFH

d) FFFFFH

Answer: FFFFH

5. Which of the following instructions affect the flags of the status register?

a) AND

b) INC

c) OR

d) All of the mentioned

Answer: All of the mentioned

6. What is the difference between the two given instructions?

LDI R16,0x34 and LDI R16,$34

a) One copies the hexadecimal value to R16 and the other copies the decimal value to the R16 register

b) One is for command, other is for data

c) One is for assignment, other is for operations

d) Both the commands are the same

Answer: Both the commands are the same

7. Which out of the following is not a directive?

a) .EQU

b) .DEVICE

c) .ORG

d) .LDI

Answer: .LDI

8. Is an assembly language a high level language?

a) Yes

b) No

c) Can’t be said

d) None of the mentioned

Answer: No

9. A 14-bit program counter can access __________ bytes of memory locations.

a) 4K

b) 8K

c) 16K

d) 64K

Answer: 16K

10. When AVR wakes up, then the value of PC becomes?

a) 00H

b) 000H

c) 0000H

d) 00000H

Answer: 00000H


Jump, Loop and Call Instructions

1. Which of the following is correct about BRNE instruction in avr microcontrollers?

a) it is used to compare two registers

b) it is used to compare two values

c) it is used to check the zero flag

d) it is used to jump to the given mentioned label when the zero flag accounts to 0

Answer: it is used to jump to the given mentioned label when the zero flag accounts to 0

2. How many times is this loop going to get executed?

LDI R20, 10 

now: LDI R21, 70 

DEC R21 

BRNE now 

OUT PORTB, R20

a) 10

b) 70

c) 700

d) none of the mentioned

Answer: 70

3. Which of the below mentioned are not the conditional jumps?

a) BRLO

b) BRMI

c) BRVC

d) None of the mentioned

Answer: None of the mentioned

4. What is the relation between the target and the relative address?

a) target address= PC address + relative address

b) target address= relation address*2

c) relative address= PC address + target address

d) none of the mentioned

Answer: target address= PC address + relative address

5. In the JMP instruction, how many bits are there for determining the target address?

a) 16

b) 32

c) 22

d) 10

Answer: 22

6. Which of the following statements are correct?

a) relative address of RJMP instruction varies from 000-fffH

b) target address of JMP instruction varies from 000000-3fffffH

c) IJMP instruction jumps to that address that points to by the Z register

d) all of the mentioned

Answer: all of the mentioned

7. Which of the following is used to represent the last RAM address?

a) MEM

b) LASTRAM

c) RAMEND

d) None of the mentioned

Answer: RAMEND

8. Which of the following statements are correct about the RCALL instruction?

a) it is a 2 byte instruction

b) it is a 4 byte instruction

c) it is a 16 byte instruction

d) none of the mentioned

Answer: it is a 2 byte instruction

9. On power on SP points to the address?

a) ffffH

b) fffH

c) 00h

d) all of the mentioned

Answer: 00h

10. Which of the following statements is true?

a) CALL instruction is used to transfer control anywhere in the 4M memory space

b) PUSH instruction is used to take out the value from the stack into some register

c) POP instruction is used to jump to any location

d) RCALL is a 4 byte instruction

Answer: CALL instruction is used to transfer control anywhere in the 4M memory space

Next

Comments