Week 7: Embedded Programming

This week

I go way off the rails.

Individual assignment: program a board

Display module: Adafruit 2.3” 128x32 OLED (SSD1305)

The Adafruit SSD1305 library shipped with some bugs:

  • Compilation error because of #define in the wrong place in the splash screen initializer.
  • Initialization code was sending commands for the 64-row OLED panel rather than the 32-row panel, resulting in display garbage.
  • display() was resetting column offsets 4 columns in the wrong direction, resulting in a 4-pixel horizontal offset and losing 4 columns of usable space.

I fixed these problems and then had a beautiful Arduino library.

Keypad module: Adafruit Trellis (HT16K33)

Test board: Teensy++ 2.0 (AT90USB1286)

Gotchas

  • Interrupt handler for Trellis interrupt can’t use I2C bus at all (trying locks up processor).