Arduino 101
Arduino 101
ASSIGNMENT ONE
1. Microcontroller
Arduino boards are powered by a microcontroller unit (MCU), with the original models,
including the Arduino Uno, utilizing an 8-bit Atmel ATmega microcontroller based on the AVR
architecture. The ATmega 328P is commonly used in the Arduino Uno.
2. Programming Interfaces
The typical method for programming microcontroller programs involves using C or assembly
language and an In-Circuit Serial Programming™ (ICSP™) interface with a dedicated
programmer.
However, Arduino distinguishes itself by allowing direct programming through a USB cable,
made possible by the Arduino bootloader. The bootloader, loaded onto the microcontroller
during manufacturing via ICSP, enables programming through a serial USART without the need
for a separate programmer.
The crucial component of the Arduino for your projects is the general-purpose Input/output
(GPIO) and ADC pins. These pins, individually addressable in your programs, function as digital
inputs and outputs. Additionally, the ADC pins can serve as analog inputs for measuring voltages
between 0V and 5V, commonly used for sensor readings.
Many of these pins have multiplexed capabilities, enabling special functions like
communication interfaces, serial interfaces, pulse-width-modulated outputs, and external
interrupts.
4. Power
For typical projects, the 5V power supplied through the USB cable is sufficient. However, when
you want to operate your project independently from a computer, there are alternative power
options. Most Arduino boards can accept a power supply ranging from 6V to 20V (with 7V to
12V recommended) through the DC barrel jack connector or the VIN pin. It's important to note
that some Arduinos operate at 5V logic levels, while others operate at 3.3V logic levels
During boot, if a programming command is received, it loads the new program; otherwise, it runs
the last uploaded sketch. When uploading via the Arduino IDE, the USB-to-serial chip resets the
main MCU into bootloader mode, receiving the new program over the UART connection.
Bootloaders simplify USB programming but use program space and introduce a few seconds
delay at boot up. Removing the bootloader allows direct programming with an external
programmer via the ICSP header.
Arduino Boards
There are many Arduino boards, and manufacturers are constantly releasing new ones with
various features. Some of the most commonly used include:
The code turns on the LED on for one second, then off for one second, repeatedly.
When simulated