Actions

Microcontroller Course

From HacDC Wiki

Revision as of 16:49, 22 October 2008 by Katie (talk | contribs) (moving this content to its own page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Five-Part Microcontroller Course

What: A five-part microcontroller course, taking you from zero to hero in just 30 days!

Where: The space.

When: Monday nights, 7:00pm to 9:00pm (nominally). Sept 8 through Oct 6.

Syllabus

Each class will be about 30 min introductory lecture, 20 min lab, 20 min lecture, 20 min lab. We’ll cover two big topics per night (usually) and get cool projects working for each.

  1. Setup: What the AVRs are, what all the pins do, what it can do for you. Then the toolchain: soldering together the programmer kits, getting the software up and running. Reading the datasheets. Labs: building the kit and running a test LED flasher. (Almost all lab today, little talk.)
  2. Outputs and bit math: How to make chips speak to the outside world, pin-by-pin. Enough C programming fundamentals to make it work. Pulse-width modulation. Labs: Cylon eyes and dimming LED’s. Extra credit: cross-fading cylon eyes!
  3. Inputs: Buttons and Analog-to-Digital conversion (ADC). Gather data input the world. Labs: pushbutton organ, light-dependent theremin. Extra credit: something else!
  4. Interrupts and Timers: Interrupts call subroutines when certain conditions are true. Timers let you time stuff. Together, they take a lot of the programming burden off your shoulders, and enable really cool stuff. Labs: Driving servo motors and/or build a better audio synth, use an LED as a light-source and light-sensor. Extra credit: capacitive touch-switch!
  5. Serial I/O: Make the micro speak to your computer (and vice-versa). We can also cover other serial protocols (I2C, SPI). Labs: Basic serial in/out, data-logging light sensor. Maybe SD/MMC cards? Extra credit: ADC + serial output + Python + laptop = ghetto oscilloscope.
  6. EEPROM, PROGMEM, etc: Tying up loose ends, special requests. PROGMEM lets you use the program memory to store lots of (constant) data. EEPROM is like flash — there’s not much of it, but it stays when you power off. Can also do misc topic requests here. Labs: writing out really long strings to serial, saving last known states for battery failure. Maybe I can think up something sexy to use these methods. Maybe not.

The Kit

The class will be based around the ATMega 48 ($4 in bulk). The basics of a programming kit for the AVR chips include: a computer (bring a laptop), a programmer ($22), a breadboard ($5). We’ll be rounding out the projects with some push-buttons, LEDs, light-sensing resistors, speakers, and servo motors. Some of this stuff is in the space, some I’ll bring in, and some will be bought for you all. $35 for the basic kit, delivered.

For $20 more, you can opt to get a super-swanky USB/TTL-serial cable, which will enable simple and clean bi-directional communication with laptops. I highly recommend ponying up for one if you think you’ll continue using micros, but if you want to kludge something together out of a plain-old USB/RS-232 Serial converter, I can help.

Let Elliot know by Friday, Aug 29, what kind of kit you want and if you’re interested but bringing your own gear.