The clock displays the number of days until the event, and every 5 seconds it switches to display "P.I." for a second. I'm using a rotary encoder to change the displayed number, and turn the clock on/off.
I have a video of it on youtube:
http://www.youtube.com/watch?v=QutpK5NM0co
I transferred it to an Adafruit Perma-Proto, and wired it up (I'm quite proud of my wiring)

((the hell is with the massive size??
However, I cannot get my code to work with the ATTiny85!! When I upload my code to it -important pins swapped to their ATTiny counterparts - and drop it in the IC socket (that I thankfully included), the clock simply does not work! All 24 segments light up, only flickering when I turn the encoder or tap the on/off button.
It SEEMS to be due to some very obscure and nonsensical differences in the naming of ATTiny V ATMega register naming. You can see some of the hacks I attempted in the included modified libraries, all succeeded in reducing compiler warnings, but not the actual functionality I'm looking for!
Some of the hacks include
- Code: Select all
#ifndef NO_PORTB_PINCHANGES
#ifndef ATTINY85
PCintPort portB=PCintPort(2, 0,PCMSK0); // port PB==2 (from Arduino.h, Arduino version 1.0)
#endif
#endif
#ifdef ATTINY85
PCintPort portB=PCintPort(2, 0,PCMSK); // port PB==2 (from Arduino.h, Arduino version 1.0)
#endif
Where the difference is that the ATTiny register is, and MUST be referred to as PCMSK (ie PinChangeMask) and not PCMSK0
- Code: Select all
#ifndef ATTINY85
PCICR |= PCICRbit;
#endif
#ifdef ATTINY85
GIMSK |= PCIE;
#endif
Is another example, wherein PCICR & PCICRbit (ie PinChangeInterruptControlRegister) on the ATMega, is GIMSK (General Interrupt Mask Register) & PCIE (Pin Change Interrupt Enable) on the ATTiny
And lastly,
- Code: Select all
#ifndef DISABLE_PCINT_MULTI_SERVICE
#ifndef ATTINY85
pcifr = PCIFR & PCICRbit;
PCIFR = pcifr; // clear the interrupt if we will process it (no effect if bit is zero)
} while(pcifr);
#endif
#endif
#ifdef ATTINY85
pcifr = PCIF & PCICRbit;
GIFR = (1<<PCIF); // clear the interrupt if we will process it (no effect if bit is zero)
} while(pcifr);
#endif
Where we're dealing with some General Interrupt Flag Register weirdness
I'd really appreciate some help!!
And by the way
Ignore the dirty dirty dirty hack that is
- Code: Select all
extern volatile float nomone;
