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