Arduino Questions and Answers – Uploading

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?
a) avrdude
b) avrgcc
c) g++
d) cpython for windows
View Answer

Answer: a
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

a) Compile
b) Error
c) Flag
d) Boolean
View Answer

Answer: c
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.
advertisement
advertisement

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
View Answer

Answer: d
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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

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
View Answer

Answer: c
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?
Find the the missing labels of pins in the diagram

Pin 1 - A
Pin 2 - B
Pin 3 - C
Pin 4 - D
Pin 5 - E
Pin 6 - F
advertisement

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
View Answer

Answer: a
Explanation: Here,

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
View Answer

Answer: d
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.
advertisement

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 _____
a) MSS
b) SMM
c) MSM
d) SMS
View Answer

Answer: a
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
View Answer

Answer: c
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…
The Independent Slave Configuration is type of SPI configuration with master device

9. What is the recipe for compiling Assembly Source Code in the Arduino IDE?
a) recipe.S.o.pattern
b) recipe.A.n.pattern
c) recipe.S.b.pattern
d) recipe.S.i.pattern
View Answer

Answer: a
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?

  1. uno.upload.tool=avrdude

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
View Answer

Answer: b
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.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.