Ice Tube Clock firmware question

Tick Tock Clock Kits

Moderators: adafruit_support_bill, adafruit

Ice Tube Clock firmware question

Postby cornz » Fri Aug 27, 2010 3:49 pm

Just assembled my clock, no issues at all (3rd adafruit kit).
What i would like to know is (and i CANNOT write computer programs, i just cant. End of) is there a firmware which supports gps time update AND auto dimming???
Many thanks and keep those projects coming. I love my tv-b-gone.
cornz
 
Posts: 52
Joined: Tue Sep 08, 2009 12:06 pm

Re: Ice Tube Clock firmware question

Postby mitpatterson » Fri Aug 27, 2010 5:38 pm

here is page that talks about mods along with how to hook up the GPS and stuff:

http://www.ladyada.net/make/icetube/mods.html
mitpatterson
 
Posts: 196
Joined: Mon Aug 02, 2010 10:45 pm

Re: Ice Tube Clock firmware question

Postby cornz » Sat Aug 28, 2010 7:13 pm

Thanks although i already have that page stored.
My problem is this, there is a firmware for the gps mod, i understand that. Then theres a firmware that supports dimming, but there isnt a firmware that supports both these features and thays what im after, a gps compatible firmware with autodimmimg included.
As much as i try to understand how to program things i just cant. It might as well be written in chinese for all the sense it makes to me.
cornz
 
Posts: 52
Joined: Tue Sep 08, 2009 12:06 pm

Re: Ice Tube Clock firmware question

Postby mitpatterson » Sat Aug 28, 2010 8:09 pm

not sure about that, and sorry, i didn't see that you wanted dimming too, not sure if there is a way to combine the codes at all, maybe someone else can shed some light on it
mitpatterson
 
Posts: 196
Joined: Mon Aug 02, 2010 10:45 pm

Re: Ice Tube Clock firmware question

Postby cornz » Sat Aug 28, 2010 8:46 pm

Ok, doubt im even near but, ive looked in the .c file for the dimming firmware and ive found this bit
/**************************** DIMMER ****************************/
void dimmer_init(void) {

dimmer_on = eeprom_read_byte((uint8_t *)EE_DIMMER);

// Power for the photoresistor
DIMMER_POWER_DDR |= _BV(DIMMER_POWER_PIN);
DIMMER_POWER_PORT |= _BV(DIMMER_POWER_PIN);

ADCSRA |= _BV(ADPS2)| _BV(ADPS1); // Set ADC prescalar to 64 - 125KHz sample rate @ 8MHz F_CPU
ADMUX |= _BV(REFS0); // Set ADC reference to AVCC
ADMUX |= _BV(ADLAR); // Left adjust ADC result to allow easy 8 bit reading
ADMUX |= _BV(DIMMER_SENSE_PIN); // Set ADC input as ADC4 (PC4)
DIDR0 |= _BV(DIMMER_SENSE_PIND); // Disable the digital imput buffer on the sense pin to save power.
ADCSRA |= _BV(ADEN); // Enable ADC
ADCSRA |= _BV(ADIE); // Enable ADC interrupt
}

// Start ADC conversion for dimmer
void dimmer_update(void) {
if (dimmer_on)
ADCSRA |= _BV(ADSC);
}

// Update brightness once ADC measurement completes
SIGNAL(SIG_ADC) {
if (!dimmer_on || displaymode == SET_BRIGHTNESS)
return;
if (ADCH > DIMMER_THRESHOLD) { // bigger number means darker room
set_vfd_brightness(BRIGHTNESS_MIN);
} else {
set_vfd_brightness(brightness_level);
}
}

**********************************************************************

Now, i assume that this is the brightness control. I also suspect that this simply turns it on as there is no mention of a menu item.
So, can i just paste this into the gps code somewhere and then somehow convert it back into something i can program back into the chip???
Or, as i suspect, am i just miles of the mark??
cornz
 
Posts: 52
Joined: Tue Sep 08, 2009 12:06 pm


Return to Clocks

Who is online

Users browsing this forum: No registered users and 1 guest

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]