December 8, 2009 8:06 PM
Re-Programming the Echo Board
by Elliot ClappThe results of Shawn helping me work through the problem of having multiple button with several positions
PNG of board that I drew in Illustrator
Main PCB with components being added
Button PCB, first try, and refinement
Button PCBs
I cut out a wooden frame on the laser cutter to to attach the buttons
Here is the code to make the LED light up when one of the buttons is pressed:
The code:
#include <avr/io.h> .org 0 cbi _SFR_IO_ADDR(DDRA), 1 sbi _SFR_IO_ADDR(DDRB), 2 loop: sbic _SFR_IO_ADDR(PINA),1 sbi _SFR_IO_ADDR(PORTB), 2 sbis _SFR_IO_ADDR(PINA),1 cbi _SFR_IO_ADDR(PORTB), 2 rjmp loop
The compile commands:
avr-gcc -c -mmcu=attiny84 -o blink.out blink.S avr-objcopy -j .text -O ihex blink.out blink.hex
The command to upload:
avrdude -F -p t84 -P usb -c avrispmkII -U flash:w:blink.hex
The reference:
www.atmel.com/atmel/acrobat/doc0856.pdf
Laser Cut Cards - Construction Kit
3-D modeling for molding and casting
MAKE blog post #1: Make a Press-fit Construction Kit