Vous êtes sur la page 1sur 15

Arduino and AVR

Ke vin J Dolan and Eric Te ve lson


Agenda
• History of Arduino
• Comparison to Othe r Platforms
• Arduino Uno - Hardware
• ATme ga328P Pe riphe rals
• Instruction Se t
• Proce ssor Compone nts
• Pipe lining
• Programming
• Applications
• Future of Arduino
History of Arduino
• Family of Microcontrolle rs cre ate d as a maste rs the sis proje ct
• inte nde d for use by a non-te chnical audie nce of artists, de signe rs, e tc.
• Made for acce ssibility and e ase of use .
• Programming made e asy for the audie nce
• Ability to program board via USB
• Ine xpe nsive price point
• Expande d for othe r type s and configurations
• Example : Arduino Lilypad for we arable te chnologie s
• Popularity has e xpande d functionality including “shie lds” and Blue tooth.
Comparison to Other Platforms
• Raspbe rry Pi
• Raspbe rry Pi is a full compute r that can run and support an OS, and has built in graphics.

• Portability is an issue , since an e xte rnal supply is ne e de d.

• Ne twork ne e ds more se tup on an Arduino

• Raspbe rry Pi doe s not support analog se nsors as we ll

• Te e nsy
• Le ss e xpe nsive

• Compatible with Arduino “ske tche s” and “shie lds”

• Be tte r ADC sampling, same functionality, be tte r re solution

• Smalle r physical board size


Arduino Uno - Hardware
• ATme ga328P Microcontrolle r
• 32 KB Flash Me mory (2 KB SRAM, 1 KB EEPROM)
• 16 MHz Clock
• 14 Digital I/O Pins
• 6 PWM Digital I/O Pins

• 6 Analog Input Pins


• Up to 20 mA DC Curre nt pe r I/O Pin up to 30 0 mA total across all pins
• 50 mA DC Curre nt on 3.3V Pin
Arduino Uno - Hardware
ATmega328P Peripherals

• Total of 6 acce ssible A/D Pins on Port C

• 14 GPIO (7 Pins e ach from PORT B & D)

• UART (Se rial)

• SPI Support

• Watchdog time r to re se t CPU


Instruction Set
• Harvard Archite cture , which is non-von Ne umann me mory, but still a von
Ne umann archite cture .
• Allows se parate storage and pathways of data and instructions
• Word width, timing and me mory addre ss structure can diffe r
• Instruction addre ss ze ro is not the same as data addre ss ze ro

• Harvard allows both re ading an instruction and re ad/write data at the same
time , e ve n with no cache
• Allows for more spe e d, since fe tch and e xe cution can be done concurre ntly
• Trade offs include cost and powe r saving from omitting cache outwe ighs the
programming pe naltie s from fe aturing distinct code and data addre ss space s.
Processor Components
• Arithme tic and Logic ope rations
be twe e n re giste rs.
• Single cycle ALU instructions

• Entire me mory space acce ssible


by conditional/unconditional
jumping.
• 16 or 32 bit instructions
• 26 8-bit re giste rs with thre e 16-bit
re giste rs.
• 16-bit re giste rs must be asse sse d
using two R/W ope rations on the 8-bit
data bus.
Pipelining
• Harvard archite cture allows paralle l instruction fe tche s and e xe cutions
• Make s a 2 stage pipe line
Programming
• Programme d in C, calle d “ske tche s”
• Structure
• He ade r: de clarations, include s, e tc.
• se tup(), e xe cute s only once whe n program starts
• loop(), continuously re -e xe cute d whe n the e nd is re ache d
• Main Program:
int main(void){
init();
setup();
for (;;)
loop();
return 0;
}
Applications
• Combine with “shie lds”, add on module s for e xpansion of functions

• Control motors for moving obje cts

• Inte rface with se nsors

• Make use of scre e ns

• Ne twork
Future of Arduino
• Arduino MEGA
• Large r Uno, more I/O

• Arduino Ze ro
• 32-bit Uno

• Arduino Due
• 32-bit MEGA, with ARM core

• Arduino Ge mma
• Small for we arable s
Sources
• https://www.arduino.cc/e n/Main/Products?from=Main.Hardware (Arduino
Hardware Listing)

• http://www.atme l.com/Image s/doc8161.pdf (AVR Data She e t)

• http://course s.cs.washington.e du/course s/cse p567/10 wi/le cture s/Le cture 6.pdf
(ATMe ga328 and Arduino Le cture from Unive rsity of Washington)

• http://www.ke nle ung.ca/portfolio/arduino-a-brie f-history-3/ (History of Arduino


Pape r)
Thank You
Any Que stions?

Vous aimerez peut-être aussi