Presentation is loading. Please wait.

Presentation is loading. Please wait.

AVR  Modern RISC architecture: Compact and FAST.  Tuned for high level languages.  Consistent architecture across entire line.  Small AVR are subsets.

Similar presentations


Presentation on theme: "AVR  Modern RISC architecture: Compact and FAST.  Tuned for high level languages.  Consistent architecture across entire line.  Small AVR are subsets."— Presentation transcript:

1 AVR  Modern RISC architecture: Compact and FAST.  Tuned for high level languages.  Consistent architecture across entire line.  Small AVR are subsets of larger chips: Same hardware and code works across all chips.  I/O structure reduces need for external components.  Flash based, ultra trivial downloading of code.

2 AVR RISC Architecture  Single Cycle Instructions: 8mhz = 8mips.  Large register file (32).  Every register an accumulator.  3 index register pairs  Register & IO are mapped in SRAM space.

3 Typical Hardware Support  Internal or External Oscillator/Clock  Brown Out Detector  One or more timers  Two or more PWM  One or more USART  I2C  Real time clock  10bit ADC  Analog Comparator  External interrupts  Pulse timing capture  EEPROM  USB/CAN/RF

4 Tools  Atmel Studio: IDE & Simulator/debugger.  BASCOM: Basic compiler & IDE with programmer.  GNU C compiler (free, very high quality).  Third party C compilers vary from cheap to very expensive.  FLASH programmers are trivial to make.

5 Availability & Price www.digikey.comwww.digikey.com has everything (single unit price):  Attiny26 (2k, ADC, USI, 2 PWM, 2 ports) $2.58  ATmega16 (16k, ADC, etc, 4 ports) $7.74  ATmega128 (128k, 6 ports, oodles of stuff) $16.34  STK500 (development board) $79  ICE200 (In circuit emulator) $100  ATAVRISP (serial programmer) $29

6 I/O Example: simple switch  No external parts

7 Input Example: Trinary Input  Three states with one input.  Useful way to expand IO.  Switch internal resistor on/off to determine state of pin.  Off: If input high, then J1-2.  On: if low, then J2-3.  On: If high, then no jumper.

8 Input example: Photo-detector  Schmitt trigger inputs on all lines.  No additional signal conditioning needed.  Stable, well defined trip points.  Basic circuit works well for Quadrature encoders.

9 Input Example: Variable Input  Useful for parts without ADC.  Set pin to output, low to discharge capacitor.  Set pin to input, no pull-up.  Increment counter until input reads 1.  Linear conversion.

10 Case Studies  BASCOM based multi-tasking Minisumo code in less than 2k  Dilbert II written with GCC in less than 6k  Gyrobot written with GCC in less than 6k  LCD user interface  PID based motion control  Sensor tasks managing tilt, gyro and wheel encoders  R/C Tether uses variable input (PC Joystick)

11 Resources  www.barello.net/ARC www.barello.net/ARC  www.barello.net/Papers www.barello.net/Papers  www.avrfreaks.net www.avrfreaks.net  www.mcselec.com/download_avr www.mcselec.com/download_avr  www.atmel.com/ www.atmel.com/

12 Cool projects & pages  http://www.mysunrise.ch/users/pfleury/index.html http://www.mysunrise.ch/users/pfleury/index.html  http://instruct1.cit.cornell.edu/courses/ee476/ http://instruct1.cit.cornell.edu/courses/ee476/  www.barello.net/Robots www.barello.net/Robots  www.egnite.de (ethernet & web software) www.egnite.de  www.avrfreaks.net (Academy tab, must register) www.avrfreaks.net


Download ppt "AVR  Modern RISC architecture: Compact and FAST.  Tuned for high level languages.  Consistent architecture across entire line.  Small AVR are subsets."

Similar presentations


Ads by Google