Can anyone point me to a link that will give me info on compiling these firmware packages the ICE Tube Clock?
I am not aware of any such resource. If you have an ATMEGA328P-PU, I would recommend playing with my firmware
. It has installation instructions, compiles cleanly, and the code is clearly written.
Some of the older firmware projects no longer compile on recent versions of GCC, so the code will need to be modified in order for them to compile. This is the procedure I used to get the Adafruit code to compile and run on my clock. The procedure for older firmware projects based on the Adafruit code should be similar.
First, the original Adafruit Ice Tube Clock code defines several pointers in program memory which are not declared as constants. These pointers are alphatable_p and numbertable_p in fonttable.h as well as digittable_p and segmenttable_p in iv.c. Recent versions of GCC do not allow nonconstant program memory pointers, so each of these pointers must be declared constant. For example, the definition of alphatable_p should be changed to
- Code: Select all
PGM_P const alphatable_p PROGMEM = alphatable;
Second, interrupt names in the original firmware have been deprecated and should be changed to their nondeprecated counterparts. Current and deprecated interrupt names are listed in the avr-libc documentation
. Different firmwares may use different interrupts, but the following interrupt name changes were required for the Adafruit GPS firmware:
- SIG_OVERFLOW0 -> TIMER0_OVF_vect
- SIG_PIN_CHANGE2 -> PCINT2_vect
- SIG_PIN_CHANGE0 -> PCINT0_vect
- SIG_INTERRUPT0 -> INT0_vect
- SIG_COMPARATOR -> ANALOG_COMP_vect
After these changes, the firmware should compile with the "make" command. The next step is to program the chip, so open the Makefile and make sure the avrdude programmer variables are set correctly. The following settings worked for me with with the Adafruit USBtinyISP:
- Code: Select all
AVRDUDE_PROGRAMMER = usbtiny
AVRDUDE_PORT = usb
On the Ice Tube Clock, set the brightness to minimum. Unplug the clock and disassemble the case. Remove the side PCB and VFD tube. If using a USBtinyISP, disconnect the power jumper. Reconnect the clock's power adapter and connect your AVR ISP programmer, ensuring PIN 1 on the ISP cable and PIN 1 on the Ice Tube Clock ISP header match. Install the new firmware to the Ice Tube Clock's ATMEGA168V chip by executing the "make full" command.
Porting a firmware to the ATMEGA328P-PU is described in another thread
Hope that helps. Happy hacking!