I used a 16x2 lcd for the display. Had to fiddle with the timer0 and timer2 interrupts a bit to scale since the clock is 16MHz. I installed a speaker and used a LED to show the boost brightness. Used a jumper for the alarm and install the three buttons. Also disabled the power down detection. Pretty much works like the Ice Tube Clock.
I did a reverse lookup to translate the display array to alpha numerics for the LCD (I guess I could go crazy and customize the LCD segments some time). Still have to add decimal point support for the number selection for date, alarm and time.
Now I can modify the clock code and test outside the Ice Tube Clock till I have what I want.
I still have to cleanup the code a bit to toggle between Ice Tube mode and Arduino mode via a define. Once I get it done, I'll post the changes.
One thing that is interesting is that it crashed sometimes when I change the brightness. Also saw this in the Ice Tube Clock but not sure if its an artifact of the port.
Who knew you could ever have so much fun with a clock!
Mike
I ported the clock to the Arduino Duemilanove
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mike31416
- Posts: 126
- Joined: Wed Aug 26, 2009 12:06 pm
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: I ported the clock to the Arduino Duemilanove
interesting...pix and code or it didnt happen
- mike31416
- Posts: 126
- Joined: Wed Aug 26, 2009 12:06 pm
Re: I ported the clock to the Arduino Duemilanove
Here a a few pictures...
- Attachments
-
- Setting the time. The '->' replaces the decimal points.
- IMG_0154.JPG (118.81 KiB) Viewed 5271 times
-
- Set time menu
- IMG_0151.JPG (119.08 KiB) Viewed 5271 times
-
- Current time. The 'o' indicates pm
- IMG_0150.JPG (123.69 KiB) Viewed 5271 times
- mike31416
- Posts: 126
- Joined: Wed Aug 26, 2009 12:06 pm
Re: I ported the clock to the Arduino Duemilanove
And a few more...
Hope to post the code by Sunday. Needs to be cleaned up a bit to highlight the changes.
Mike
Hope to post the code by Sunday. Needs to be cleaned up a bit to highlight the changes.
Mike
- Attachments
-
- My clock!
- IMG_0164.JPG (100.41 KiB) Viewed 5268 times
-
- Layout
- IMG_0160.JPG (138.44 KiB) Viewed 5268 times
-
- Showing current date
- IMG_0157.JPG (126.92 KiB) Viewed 5268 times
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: I ported the clock to the Arduino Duemilanove
neat. and a good idea. the ice tube clock was prototyped all on a ice tube PCB. lots of unplugging the tube.
- mike31416
- Posts: 126
- Joined: Wed Aug 26, 2009 12:06 pm
Re: I ported the clock to the Arduino Duemilanove
Here are the code changes...
- Attachments
-
- ITC Port.zip
- Changes made to Sep 30 2009 firmware
- (28.42 KiB) Downloaded 266 times
Last edited by mike31416 on Sun Oct 11, 2009 3:55 pm, edited 1 time in total.
-
- Posts: 1645
- Joined: Sat Nov 10, 2007 12:59 am
Re: I ported the clock to the Arduino Duemilanove
why not replace the crystal with a watch crystal?
well, first alter the fuses to use the internal oscillator, then burn a lilypad bootloader, then swap the crystal. probably have to swap a couple of caps, too.
well, first alter the fuses to use the internal oscillator, then burn a lilypad bootloader, then swap the crystal. probably have to swap a couple of caps, too.
- mike31416
- Posts: 126
- Joined: Wed Aug 26, 2009 12:06 pm
Re: I ported the clock to the Arduino Duemilanove
I am only using the Duemilanove as a test platform to check changes made to the clock code. No intention of using it as a clock.
Mike
Mike
- len17
- Posts: 394
- Joined: Sat Mar 14, 2009 7:20 pm
Re: I ported the clock to the Arduino Duemilanove
A couple of questions:
How did you download the Ice Tube firmware to the Arduino? Via ICSP or the USB bootloader?
If you use ICSP, does it wipe out the Arduino's bootloader?
(I want to make a clock based on Ice Tube firmware but using an old LED display. I haven't decided whether to wire it up from scratch or start with a Boarduino.)
How did you download the Ice Tube firmware to the Arduino? Via ICSP or the USB bootloader?
If you use ICSP, does it wipe out the Arduino's bootloader?
(I want to make a clock based on Ice Tube firmware but using an old LED display. I haven't decided whether to wire it up from scratch or start with a Boarduino.)
- mike31416
- Posts: 126
- Joined: Wed Aug 26, 2009 12:06 pm
Re: I ported the clock to the Arduino Duemilanove
Mostly I use the USB. When I built my tinyisp, I tested it using the arduino and yes it did wipe the bootloader. I reloaded the bootloader and continue to use the USB. The USB/bootloader seems to load the firmware a bit faster.
Mike
Mike
- len17
- Posts: 394
- Joined: Sat Mar 14, 2009 7:20 pm
Re: I ported the clock to the Arduino Duemilanove
Thanks. Next question:
How do you download your compiled .hex file via USB? I can't figure out how to do that with avrdude or the Arduino software. (Unless you're using the Arduino environment to compile the firmware? Does that work?)
If I get past the breadboard stage, I'll change it to use a watch crystal and the internal CPU clock, at which point I might as well use the USBtiny and lose the bootloader.
How do you download your compiled .hex file via USB? I can't figure out how to do that with avrdude or the Arduino software. (Unless you're using the Arduino environment to compile the firmware? Does that work?)
If I get past the breadboard stage, I'll change it to use a watch crystal and the internal CPU clock, at which point I might as well use the USBtiny and lose the bootloader.
- mike31416
- Posts: 126
- Joined: Wed Aug 26, 2009 12:06 pm
Re: I ported the clock to the Arduino Duemilanove
I use Eclipse & WinAVR to edit and compile and the following avrdude command command line to download:
avrdude -pm328p -cstk500v1 -PCOM3 -b57600 -Uflash:w:iv.hex:a
Mike
avrdude -pm328p -cstk500v1 -PCOM3 -b57600 -Uflash:w:iv.hex:a
Mike
- len17
- Posts: 394
- Joined: Sat Mar 14, 2009 7:20 pm
Re: I ported the clock to the Arduino Duemilanove
Thanks, I get it now.
- mike31416
- Posts: 126
- Joined: Wed Aug 26, 2009 12:06 pm
Re: I ported the clock to the Arduino Duemilanove
Glad to help.
BTW... I found a small problem with the LCD driver. I was clearing the ports that the control and data outputs were using. This could cause problems if the LCDinit function were called after the application setup other bits in the ports for other uses. Updates is attached.
Mike
BTW... I found a small problem with the LCD driver. I was clearing the ports that the control and data outputs were using. This could cause problems if the LCDinit function were called after the application setup other bits in the ports for other uses. Updates is attached.
Mike
- Attachments
-
- LCD.zip
- (3.34 KiB) Downloaded 220 times
-
- Posts: 106
- Joined: Mon Nov 23, 2009 10:10 pm
Re: I ported the clock to the Arduino Duemilanove
Cool. Ice cool!
Please be positive and constructive with your questions and comments.