Thursday, April 7, 2022

Test your knowledge in Arduino and ATmega328P: QUIZ# 2

 


[Picture Source: https://content.arduino.cc/assets/Pinout-UNOrev3_latest.png]

Arduino Quiz# 2

1. As the pins A0 to A5 are configured as Analog Input pins on Arduino UNO, it is not necessary to declare the pins as input pins using the function pinMode(). State true or false.

A. True
B. False

2. Which one of the following statements is not correct about the microcontroller ATmega328P?

A. The IO port registers PORTx and DDRx are read/write types, whereas the PINx register is a read-only type
B. The six of the PORTC pins are configured as Analog Input on Arduino UNO
C. All ports B, C and D could be configured as digital input/output along with other functions
D. The ADC inside ATmega328P is six channel 10-bit ADC
E. None of the above

3. The IO ports of ATmega328P are controlled and accessed by three registers:

A. DDRx, PORTx and LOADx
B. DDRx, PINx and LOADx
C. PORTx, PINx and DDRx
D. PINx, PUSHx and POPx
E. None of the above

4. The IO port registers are basically built out of:

A. Diodes
B. D-FFs
C. RS FFs
D. Wire junctions
E. None of the above

5. Stack Pointer register increments by 1 during the execution of a POP instruction execution and decrements by 1 during PUSH instruction execution.

A. True
B. False

6. If the ADC of ATmega328P on Arduino UNO is configured to use the internal voltage reference, the analog values 0 and 1023 read on pin A0 using the analogRead() function would correspond to:

A. 0V and 5V respectively
B. 0V and 1.1V respectively
C. 0.1V and 4V respectively
D. 0V and 4V respectively
E. None of the above

7. STACK has majorly two uses. Those are:

A. as temporary storage for variables, the values which are needed to be restored later and to store the Stack Pointer
B. to store the return address during function calls and as temporary storage for variables, the values which are needed to be restored later
C. to manipulate data during program execution and to store the return address during function calls
D. to store instructions and to store the addressed of the functions

8. Assume that the ADC of ATmega328P on Arduino UNO has the default configuration for reference voltage (AREF). What is the LSB in terms of voltage?

A. 4.25 mV
B. 0.12 V
C. 4.88 mV
D. 3.26 mV
E. None of the above

9. Data memory read access is faster than the same for program memory.

A. True
B. False

10. PINx register can be read or be written as well by the program. State whether true or false:

A. True
B. False

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Answers for Quiz# 1 (in the previous post):

1. B     2. A     3. C     4. A.    5. A    6. A    7. A    8. A    9. C    10. D

 


No comments: