This set of Arduino Multiple Choice Questions & Answers (MCQs) focuses on “Uploading”.
1. Which software is used to upload the Arduino Sketches to the board?
d) cpython for windows
Explanation: The AVR-GCC/G++ software is a compiler which can take C/C++ code as input and translate or compile it into Binary Code that follows the instruction set for the AVR Microcontrollers. After that process is done, the avrdude software has the job of uploading the hex file to the microcontroller, more specifically the AVR Microcontroller family.
2. What is the name for the characters ‘-p’ given in the command below?
avrdude -p atmega32u4 -c stk500 -e -U flash:w:diag.hex
Explanation: The character that is being referred here is called a flag. It is basically like a condition or argument that needs to be fulfilled by the program which is to be invoked with the help of the command that the user enters, followed by the actual parameters of that command. Here the flag “p” suggests the explicit mention of the type of the target device.
3. What is the use of the dmesg command?
a) Sending messages to the device connected
b) Reading messages generated from avrdude
c) Receiving messages from the gcc compiler
d) Receiving messages from the particular device
Explanation: The dmesg command is used for displaying any messages like errors or warnings that a device might have issued to the system. It can give us 3 things; the time, i.e. the time after startup when the message was generated, the device name, and the message text or message content.
4. What is USBasp?
a) It is a compiler for microcontroller code
b) It is a software for debugging any code preexisting in microcontrollers
c) It is a programmer for a specific microcontroller family
d) It is a microcontroller that is produced by Atmel
Explanation: It is a USB programmer for AVR microcontrollers which most Arduino Boards use. In that it is used to put programs into the microcontroller using the flash and the EEPROM of that microcontroller. It is itself powered by an Atmega8 chip. This hardware coupled with the avrdude software is a powerful tool to upload programs into the microcontrollers.
5. What are the missing labels in the diagram given below?
Pin 1 - A Pin 2 - B Pin 3 - C Pin 4 - D Pin 5 - E Pin 6 - F
a) A=MOSI, B=VCC, C=GND, D=RESET, E=SCK, F=MISO
b) A=VCC, B=MOSI, C=SCK, D=GND, E=MISO, F=RESET
c) A=SCK, B=MISO, C=RESET, D=GND, E=VCC, F=MOSI
d) A=MISO, B=MOSI, C=RESET, D=VCC, E=GND, F=SCK
Pin 1 - MOSI or Master Output Slave Input Pin 2 - VCC (5V Input Supply) Pin 3 - GND (Common Ground) Pin 4 - RESET (Pin that resets the microcontroller manually if something goes wrong.) Pin 5 - SCK (Serial Clock Pin) Pin 6 - MISO or Master Input Slave Output
6. What is the use of the MOSI and MISO pins?
a) To download code from the microcontroller to the computer
b) To verify the program that the computer uploads to the microcontroller
c) To erase the SRAM of the microcontroller
d) To dump or transfer programs from the computer to the microcontroller
Explanation: The MOSI and MISO pins are a part of the SPI (Serial Peripheral Interface) for transferring data over short distances. It is a form of Synchronous Serial Communication. These pins commit hex data from the computer to the EEPROM and flash memory of the microcontroller.
7. Fill in the correct pattern of words for the following statement. (Here, M->Master & S-> Slave)
During data transfer from ______ to _____ the clock is synchronized according to the _____
Explanation: The SPI (Serial Peripheral Interface) enables data transfer using 4 wires of which the MOSI and MISO transfer data between the slave and master devices and the SCK pin through which the Serial Clock Pulse is transmitted is used by the master device to sync with the slave device to a frequency which the slave device supports.
8. Select the correct name for the SPI master-slave configuration.
a) Dependent Slave Configuration
b) Independent Master Configuration
c) Independent Slave Configuration
d) Chained Master and Slave Configuration
Explanation: The Independent Slave Configuration is a type of SPI configuration where each slave is a separate chip and the master device talks to one chip at a time.
The setup is given below…
9. What is the recipe for compiling Assembly Source Code in the Arduino IDE?
Explanation: A recipe in Computer Science is the steps involved in creating something. Here the compiler has a predetermined “Recipe” or way to deal with Assembly Source Codes when the need arises. Now since the Arduino IDE can also compile C and C++ source files, it also has a predetermined way to deal with those file types as well.
10. What is the purpose of the code given below?
a) To set the Board Variant name
b) To set the upload software name
c) To erase the upload tool name
d) To reset the upload tool
Explanation: Avrdude is the name of the software that is used by the Arduino IDE to upload the hex files to the AVR Based microcontrollers. This line of code given above sets the tool name that is to be used for uploading the hex files that are generated after compilation of the Arduino source code.
Sanfoundry Global Education & Learning Series – Arduino.
To practice all areas of Arduino, here is complete set of 1000+ Multiple Choice Questions and Answers.