0% found this document useful (0 votes)
5 views21 pages

Getting Started With Arduino

The document provides an overview of Arduino's pin configuration and common functions, detailing digital, analog, power, and communication pins. It explains the use of SPI (Serial Peripheral Interface) for communication between a master device and peripheral devices, highlighting key components and advantages of SPI. Additionally, it lists common SPI devices used in embedded applications.

Uploaded by

XAnder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views21 pages

Getting Started With Arduino

The document provides an overview of Arduino's pin configuration and common functions, detailing digital, analog, power, and communication pins. It explains the use of SPI (Serial Peripheral Interface) for communication between a master device and peripheral devices, highlighting key components and advantages of SPI. Additionally, it lists common SPI devices used in embedded applications.

Uploaded by

XAnder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Getting Started With

Arduino
Common Functions of
Arduino
Pin Diagram of Arduino
Digital Pins (0-13)

➢ Pins 0 to 13: These are digital


input/output pins that can be
used as either inputs or outputs
using functions such as
pinMode(), digitalWrite(), and
digitalRead() etc.

➢ Each pin operates at 5V and can


provide or receive a maximum of
40 mA of current.
Pin Diagram of Arduino

➢ Pin 0 (RX) and Pin 1 (TX): Used


for serial communication. RX is
used for receiving data, and TX is
used for transmitting data.

➢ These are connected to the USB-


to-TTL serial chip, so avoid using
them if you're using the USB
port for programming.
Pin Diagram of Arduino
➢ PWM (Pulse Width Modulation)
Pins (3, 5, 6, 9, 10, 11)

➢ These digital pins can be used as


PWM outputs using the
analogWrite() function. PWM is
used to simulate analog output,
commonly used for dimming
LEDs or controlling motor speed.
Pin Diagram of Arduino

Analog Pins (A0-A5)

Pins A0 to A5: These are analog


input pins, capable of reading a
voltage between 0 and 5V using the
analogRead() function. They have a
10-bit resolution, returning values
from 0 to 1023.
Pin Diagram of Arduino

Power Pins

Vin: Input voltage to the Arduino


board when using an external
power source (6-20V). You can
supply voltage through this pin or
the power jack.
Pin Diagram of Arduino

5V: The regulated power supply


used to power the microcontroller
and other components on the
board. Can come from USB, Vin
(through the regulator), or an
external power supply.

3.3V: A 3.3V supply generated by


the onboard regulator. Maximum
current draw is 50 mA.
Pin Diagram of Arduino

GND: Ground pins.

RESET: Resets the microcontroller.


Can be used to restart the program
from the beginning.
Pin Diagram of Arduino
Other Pins
AREF (Analog Reference): Used to
set an external reference voltage (0-
5V) as the upper limit for analog
inputs.
IOREF: Provides the voltage
reference at which the
microcontroller is operating (usually
5V on Arduino Uno). Allows the
shields to adapt to the board's
voltage.
Pin Diagram of Arduino
SPI Pins (10, 11, 12, 13)
Pin 10 (SS - Slave Select): Used to
select the SPI slave device.
Pin 11 (MOSI - Master Out Slave In):
Sends data from the Arduino to the
connected SPI device.
Pin 12 (MISO - Master In Slave Out):
Receives data from the connected SPI
device.
Pin 13 (SCK - Serial Clock): Provides
the clock signal used to synchronize
data transmission.
Pin Diagram of Arduino

I2C Pins (A4, A5)


SDA (A4): Serial Data Line used for
I2C communication.
SCL (A5): Serial Clock Line used for
I2C communication.
LED Indicators
Pin 13 (Built-in LED): Onboard LED
connected to digital pin 13. This LED
is handy for testing simple sketches
without connecting external LEDs.
Pin Diagram of Arduino

Communication Pins
TX/RX LEDs: Indicate serial data
transmission (TX) and reception
(RX). These LEDs blink when data is
being sent or received via the USB-
to-serial chip and USB connection.
SPI (Serial Peripheral Interface)
Devices

SPI (Serial Peripheral Interface) is a


synchronous serial communication
protocol used primarily to
communicate between a master device
(such as a microcontroller like the
Arduino) and one or more peripheral
devices (like sensors, displays, or
memory chips). It’s widely used
because of its speed and simplicity,
especially when high-speed data
transfer is required.
Key Components of SPI
Communication:
1. Master and Slave Devices:
o Master: The device that
controls the communication,
typically a microcontroller
(e.g., Arduino).
o Slave(s): The devices that
respond to the master's
commands, such as sensors,
displays, SD cards, etc.
SPI Signals:
o MOSI (Master Out Slave In): The line
through which data is sent from the
master to the slave.
o MISO (Master In Slave Out): The line
through which data is sent from the
slave back to the master.
o SCK (Serial Clock): The clock signal
generated by the master to
synchronize data transfer.
o SS (Slave Select): A line used by the
master to select which slave device to
communicate with. When SS is low,
the slave device is active; when high,
it is inactive.
How SPI Works:
1. Data Transfer: SPI is a full-duplex
communication protocol,
meaning data can be sent and
received simultaneously.
2. Clock Control: The master
generates the clock signal on the
SCK line, which dictates the
timing of data transmission.
3. Slave Selection: Only the slave
with its SS line pulled low
communicates with the master.
Multiple slaves can be connected
to the same SPI bus, and the
master controls which one to
communicate with by toggling the
corresponding SS line.
Advantages of SPI:
∙ High Speed: SPI supports high
data rates compared to other
protocols like I2C.
∙ Simplicity: The protocol is
straightforward, with minimal
software overhead.
∙ Full Duplex: Data transmission in
both directions simultaneously
increases efficiency.
Common SPI Devices:
∙ Sensors: Gyroscopes,
accelerometers, temperature
sensors.
∙ Memory Devices: EEPROM,
Flash memory.
∙ Displays: OLEDs, LCDs.
∙ SD Cards: Used for data storage
in many embedded applications.

You might also like