Current revision: rev2 (microSD, RGB led, button).
Example firmwares are in
fw-* directories. See below for the current
list. The firmwares can be compiled by running
make in the appropriate
directory, and after the putting the stick into DFU mode, it can be
Note that the USB capable firmwares use Dean Camera's remarkable LUFA
library - so you'll need to download, unpack and copy the
subdirectory into the appropriate subdirectory here.
Blink (on/off) the green led with 700ms delay.
Act like a composite Keyboard+Mouse device. "Type" a message on pressing
E0 button. The content of the message is read from the file called
MESSAGE.TXT in the top directory of the first (FAT-formatted)
partition on the microSD card.
This demo uses LUFA to pretend to be a USB Keyboard and Virtual CDC Serial device. The RGB led changes colour with time.
No USB interface. Three possible tests (select by #define in the source):
- Blink test: just blink the three colours on the RGB LED.
- PWM test: the LED on rev2 breathes, one colour after another.
- SD test: try accessing the microSD card. Blinks blue before the test. If successful, switch to green.
A subset of
fw-serial-keyb-pulseled functionality - just
breathe/change colour of the RGB LED. No USB, no microSD, no button.
Revision 2 notes
There's a mistake on the silkscreen in RGB colour marking: E2 is red and E3 is blue. (I guess this depends on the RGB LEDs that I have.)
Technical info (can be ignored, it's for me to remember)
Need to program bootrst fuse, and MattairTech also changes watchdog settings. I don't know if that's really needed. Nothing else is changed:
avrdude -p x128a4u -c avrisp2 -U fuse1:w:0x00:m -U fuse2:w:0xBF:m -U fuse4:w:0xFF:m -U fuse5:w:0xFF:m
fuse1 consists of two 4-bit initial watchdog values (normal and window, see page 127 of xmega manual). AVR stick uses 0xFF (no watchdog) and MattairTech uses 0x00 (8ms watchdog).
EESAVE is bit3 of fuse5 (0 -> eeprom is preserved during erase), so to save eeprom on chip erases, use fuse5:w:0xF7:m. However this doesn't prevent the (DFU) bootloader to erase eeprom, and indeed, it's impossible to have DFU not erase eeprom without recompiling.
Bootloader and lockbits
Flash the bootloader with
avrdude p x128a4u c avrisp2 U flash:w:MTDBX4128a4u_104.hex
MattairTech also locks bootloader and r/w. Don't want that (so don't do the following):
avrdude p x128a4u -c avrisp2 U lock:w:0x3c:m