Introduction to programming AVR microcontrollers

7,119 views

Published on

These are the slides from a talk I gave at Barcamp Brighton 2 (March 2008, Brighton, UK). It doesn't contain any actual code as I did that as a live demo, but it's got some handy links to places with information about programming AVR chips.

Published in: Business, Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
7,119
On SlideShare
0
From Embeds
0
Number of Embeds
472
Actions
Shares
0
Downloads
342
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Introduction to programming AVR microcontrollers

  1. 1. Do you want chips with that? Physical Computing on the cheap
  2. 2. What? + + =
  3. 3. AVR microcontrollers <ul><li>Embedded computer (8-bit RISC, up to 20MIPS, with ADC, PWM, timers, EEPROM...) </li></ul><ul><li>1k to 32Mb programme memory </li></ul><ul><li>80p to £4.50 each </li></ul><ul><li>Can be programmed in-system using C </li></ul><ul><li>Hobbyist-friendly format (DIL) </li></ul><ul><li>Used in cars, microwaves, traffic signals... and the Arduino </li></ul>
  4. 4. Why? <ul><li>Physical computing </li></ul><ul><li>Inputs (sensors) sound, light, motion (switches, dials, flex, pressure, accelerometer, IR/ultrasound ranging), serial input from computer </li></ul><ul><li>Outputs (actuators) sound, light (LEDs – digital and 'analog'), motion (motors, servos), other devices (using relays), serial output to computer </li></ul>
  5. 5. How? <ul><li>Computer (Linux, Mac, Windows) </li></ul><ul><li>AVR-GCC compiler </li></ul><ul><li>AVRdude programmer </li></ul><ul><li>Cable </li></ul><ul><li>Breadboard or socket </li></ul><ul><li>AVR chip </li></ul>
  6. 6. How cheap? <ul><li>£3: DIY parallel cable (search Instructables for 'ghetto programming') </li></ul><ul><li>£10: DIY serial cable (adafruit.com) </li></ul><ul><li>£15: DIY USB cable (adafruit.com) </li></ul><ul><li>£25: pre-built USB (Rapid electronics) </li></ul>
  7. 7. Demo <ul><li>Switch to a laptop with a serial port... </li></ul>
  8. 8. Examples
  9. 9. Programmable LED <ul><li>Invented by Alex Weber </li></ul><ul><li>http://www.instructables.com/id/Programmable-LED/ </li></ul>
  10. 10. Micro text display <ul><li>Invented by Windell Oskay (Evil Mad Scientist Laboratories) </li></ul><ul><li>http://www.evilmadscientist.com/article.php/microreader2 </li></ul>
  11. 11. MiniPOV <ul><li>Invented by Limor Fried </li></ul><ul><li>http://www.ladyada.net/make/minipov2/ </li></ul>
  12. 12. Multimode mood candle <ul><li>Invented by yours truly </li></ul><ul><li>http://www.instructables.com/member/tristanr/ (hassle me if it's not there soon: [email_address] ) </li></ul>
  13. 13. Aside: the Arduino <ul><li>Open source hardware in a variety of shapes and sizes </li></ul><ul><li>Uses the ATMEGA168 chip </li></ul><ul><li>Easier to programme (Wiring vs C) </li></ul><ul><li>Adds: - headers for all pins - voltage regulator - status LEDs - USB-serial converter </li></ul>
  14. 14. Links <ul><li>Instructables - http://www.instructables.com/ </li></ul><ul><li>Make Magazine - http://www.makezine.com/ </li></ul><ul><li>Lada Ada - http://www.ladyada.net/make/ </li></ul><ul><li>Evil Mad Scientist Laboratories - http://www.evilmadscientist.com/ </li></ul><ul><li>Atmel - http://www.atmel.com/products/avr/ </li></ul><ul><li>AVR Freaks - http://www.avrfreaks.net/ </li></ul>
  15. 15. P.S. <ul><li>If anybody would like to share postage on buying some business-card sized prototype boards, please contact me: [email_address] http://www.evilmadscientist.com/article.php/card </li></ul>

×