0

Ice Tube Clock firmware for newbie.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Ice Tube Clock firmware for newbie.

by rjhike on Thu Jan 29, 2015 9:31 pm

I ordered the Ice Tube Clock and a USBtinyISP two days ago. I want to add GPS. I also would like Auto DST, auto-dim and no leading zero ( 9:00 not 09:00). I have a GPS receiver from another nixie clock, which is a 9600 baud so I need the firmware with GPS 9600 baud.
I installed CrossPack AVR on my computer (Mac) and it is working. I also will try to use AVR Tools. I have download a couple of firmware files, but I am not sure if they will work. One of which is xmas from johnarchie. Will that firmware work on the kit version or only his modified clock? How will I know? Is there a way to look at the firmware to see if it can use a 9600 baud GPS?
I have ordered a ATMEGA 328 chip if needed.
A lot of the information that I have read is old, like the firmware comparison chart and the orginial firmware is 5 years old. Does Adafruit update the firmware?
I have been having trouble finding what command line to use to get the firmware to the clock using avrdude. Which files to download to the clock, .hex and or something called the "makefile"?
The actual building of the clock I think that I can handle. (I have made a lot of other clocks, radios, etc). It is the firmware upgrading that I need help.
Any help would be greatly appreciated.

rjhike
 
Posts: 15
Joined: Thu Jan 29, 2015 8:35 pm

Re: Ice Tube Clock firmware for newbie.

by jarchie on Fri Jan 30, 2015 3:06 am

rjhike wrote:I ordered the Ice Tube Clock and a USBtinyISP two days ago. I want to add GPS. I also would like Auto DST, auto-dim and no leading zero ( 9:00 not 09:00).

The xmas firmware supports all of these things. I think wbp's firmware does as well.

rjhike wrote:Will that firmware work on the kit version or only his modified clock?

The xmas firmware works on both.

rjhike wrote:Is there a way to look at the firmware to see if it can use a 9600 baud GPS?

The xmas firmware supports 9600 baud, by default.

rjhike wrote:I have ordered a ATMEGA 328 chip if needed.

Make sure it's an ATmega328p... A lot of people forget the "p" and order the wrong part.

rjhike wrote:Does Adafruit update the firmware?

Adafruit updated their firmware to support GPS, but that's all, as far as I know.

rjhike wrote:I have been having trouble finding what command line to use to get the firmware to the clock using avrdude. Which files to download to the clock, .hex and or something called the "makefile"?

You could check out this tutorial for Windows. I use a Mac as my main computer as well, and the process is similar. The main difference is that I use Terminal.app instead of the Cygwin terminal; AVR Crosspack will probably work just fine, although I personally use MacPorts with the avr-gcc and avrdude packages. Alternatively, I did post binaries recently, but I encourage you to learn how to compile yourself. It's a useful skill.

rjhike wrote:It is the firmware upgrading that I need help.

I hope this helps to get you started, but if you have any other questions please ask.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Ice Tube Clock firmware for newbie.

by rjhike on Fri Jan 30, 2015 12:28 pm

Thank you for your help.
Will I need to change some of the values in the firmware files before I download them to the clock? If so can I use Text Editor.app on the Mac?
Have you tried AVR Tools? "AVR Tools is a Mac OS X GUI that uses avrdude to program Atmel AVR microcontrollers". http://www.w7ay.net/site/Applications/A ... index.html
The last time that I did any programming, was in 1984, Fortran. :(

rjhike
 
Posts: 15
Joined: Thu Jan 29, 2015 8:35 pm

Re: Ice Tube Clock firmware for newbie.

by jarchie on Fri Jan 30, 2015 4:01 pm

rjhike wrote:Will I need to change some of the values in the firmware files before I download them to the clock?

Not for the features that you specifically mentioned; support for the GPS and autodimmer mods are enabled by default. I still recommend skimming through config.h to see the compile-time options that are available. It's a long file, but definitely read the comments for "Adafruit-style buttons," "automatic dimmer hack," and "GPS timekeeping." The Makefile is already setup for the USBtinyISP, so no changes should be needed there.

rjhike wrote:If so can I use Text Editor.app on the Mac?

TextEdit.app will be fine, and is what I would recommend initially because it's installed by default.

Eventually, you might wish try a text editor designed specifically for source code such as Sublime Text.

rjhike wrote:Have you tried AVR Tools? "AVR Tools is a Mac OS X GUI that uses avrdude to program Atmel AVR microcontrollers". http://www.w7ay.net/site/Applications/A ... index.html

It looks like a nice program, but I've never tried it. Installing from the command line is a bit more traditional, and allows xmas to be compiled using the same commands on Windows, Mac, and Linux. So I recommend the command line because there will be more forum users here, including myself, who can help you figure everything out.

rjhike wrote:The last time that I did any programming, was in 1984, Fortran. :(

To me, that just means that you have more experience than most self-described newbies. :-)

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Ice Tube Clock firmware for newbie.

by jarchie on Sat Jan 31, 2015 4:35 pm

If it helps, I just created a Mac tutorial adapted from the Windows tutorial. There were only minor changes needed, as the process is virtually identical. The main difference is that fewer things need to be installed on the Mac.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Ice Tube Clock firmware for newbie.

by rjhike on Sun Feb 01, 2015 10:09 pm

Wow! Thanks for the help.
I did buy the correct ATmega328p IC. I also bought two photcells. PDV-P9007 (10k-100K) and a PDV-P7002 cell. Did I buy correct photocell? Which one should I use? Or do you recommend another?

rjhike
 
Posts: 15
Joined: Thu Jan 29, 2015 8:35 pm

Re: Ice Tube Clock firmware for newbie.

by jarchie on Sun Feb 01, 2015 10:42 pm

rjhike wrote:Wow! Thanks for the help.

You're very welcome!

rjhike wrote:I also bought two photcells. PDV-P9007 (10k-100K) and a PDV-P7002 cell. Did I buy correct photocell? Which one should I use? Or do you recommend another?

Neither is the one I recommend, but the PDV-P7002 is a close match. Pair it with a pull-up resistor of around 8.7k--a 10k should be fine. For more information, I'll refer you to the docs.

jarchie wrote:I still recommend skimming through config.h... It's a long file, but definitely read the comments for "Adafruit-style buttons," "automatic dimmer hack," and "GPS timekeeping."

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Ice Tube Clock firmware for newbie.

by rjhike on Tue Feb 03, 2015 1:10 pm

I followed your tutorial and it worked perfectly. I now am at the Installing firmware section, waiting to build the USBtiny. I might have to call in sick and stay home to build it when it arrives. :)
Where do I find the menu selection to show GPS connection, DST, or AM/PM? I remember reading that two of the three can be indicated on the display.
But I can't find where and how to make those selections.
Thanks again.

rjhike
 
Posts: 15
Joined: Thu Jan 29, 2015 8:35 pm

Re: Ice Tube Clock firmware for newbie.

by jarchie on Tue Feb 03, 2015 5:18 pm

rjhike wrote:I followed your tutorial and it worked perfectly.

Excellent! This means that the build environment is setup correctly, and that is the most difficult part. Once the USBtinyISP is correctly assembled, I doubt you'll have any trouble with programming, as long as you connect the clock exactly as described in the README.

rjhike wrote:Where do I find the menu selection to show GPS connection, DST, or AM/PM? I remember reading that two of the three can be indicated on the display.
But I can't find where and how to make those selections.

If you'll humor me, let me share a bit about the xmas design philosophy before answering your question. When you were looking through config.h, you probably noticed that nearly all of the options there are hardware support options such as for the GPS mod, autodimmer mod, TCXO mod, and so on. In contrast to the hardware support options, there are clock settings such as the current time, alarm times, alarm volume, display brightness, time format, and so on. Unlike the hardware support options, users should be able to change clock settings through the menus. So the hardware support options are specified at compile-time in config.h and cannot be changed without recompiling xmas and reprogramming the chip. But the clock settings are configurable through the clock menus and thus can be changed at any time.

At this point, you've probably answered your own question: The GPS, DST, and PM indicators are clock settings, and you will be able to configure those through the clock menus... but only after the firmware is installed on your clock. If you have trouble finding the option, check out the clock usage documentation in the USAGE file.

By the way, even without the GPS indicator, you will know that the GPS is working because the "set time" and "set date" menu options disappear. And if the GPS signal is lost while the clock is connected to the GPS unit, the display will start flashing "gps lost" after a couple of minutes with no GPS signal. So once the GPS is connected and configured properly, you will know that it is working, even without the GPS indicator.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Ice Tube Clock firmware for newbie.

by rjhike on Sat Feb 07, 2015 9:35 pm

When I transferred the firmware to the chip, there was an error message.

avrdude: verifying ...
avrdude: 28122 bytes of flash verified
avrdude: reading input file "icetube_eeprom.hex"
avrdude: writing eeprom (65 bytes):

Writing | | 0% 0.00s
avrdude: error: usbtiny_send: usb_control_msg(DeviceRequestTO): transaction timed out (expected 128, got -60)
Writing | ################################################## | 100% 1.68s

Did I do something wrong?

Also your tutorial shows 30104 bytes of flash and this output shows 28122. Is this okay?

Thanks again.

rjhike
 
Posts: 15
Joined: Thu Jan 29, 2015 8:35 pm

Re: Ice Tube Clock firmware for newbie.

by jarchie on Sat Feb 07, 2015 10:48 pm

rjhike wrote:When I transferred the firmware to the chip, there was an error message...

Check out the troubleshooting section of the firmware/README. If that doesn't help, feel free to post back here.

rjhike wrote:Also your tutorial shows 30104 bytes of flash and this output shows 28122. Is this okay?

Yes, this is fine. It just means that your compiler is a more recent version and optimizes the code to a smaller size.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Ice Tube Clock firmware for newbie.

by rjhike on Tue Feb 10, 2015 2:34 pm

In the x-mas firmware, I am looking for a time format HH (decimal point) MM (decimal point) SS. I would like that format with flashing decimal points. I could only find HH MM SS, no decimal points. Did I miss that format when I scrolled through the options in cfg regn - time fmt?

rjhike
 
Posts: 15
Joined: Thu Jan 29, 2015 8:35 pm

Re: Ice Tube Clock firmware for newbie.

by jarchie on Tue Feb 10, 2015 5:28 pm

Congratulations on getting the firmware flashed to your clock! Was the solution to your problem described in the firmware/README troubleshooting section? If not, I'd be curious what the problem was, in case I can revise the documentation to help future users.

rjhike wrote:In the x-mas firmware, I am looking for a time format HH (decimal point) MM (decimal point) SS. I would like that format with flashing decimal points. I could only find HH MM SS, no decimal points. Did I miss that format when I scrolled through the options in cfg regn - time fmt?

It sounds like you would like a format like "HH._MM._SS" where the underscore represents a blank digit. Is that correct? If so, that format is not currently available in xmas, but should be an easy thing to add. I would be willing to add that format--perhaps this weekend--but would like you to first try the other decimal-separated formats like "HH.MM.SS.PM" or "HH.MM.SS.CC" (CC = centiseconds). Those will give you a feel for how time formats with decimal separators and adjustable blink rates are displayed and if "HH._MM._SS" is worth adding.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Ice Tube Clock firmware for newbie.

by rjhike on Tue Feb 10, 2015 5:55 pm

Thank you for all your help in getting the firmware and instructions!
I just ended up putting the chip in the clock and it worked. I didn't have to make any changes that were suggested in the troubleshooting page.
Yes I would like the HH._MM._SS. I tried the other settings HH.MM.SS.PM" or "HH.MM.SS.CC" (CC = centiseconds), but IMHO, they look kind of busy. Maybe use the HH.MM.SS.PM without the PM, and use the indicator dot for PM?
I have another six tube nixie clock that has two neon bulbs for colons that I have set to blink and it to me it looks good.
The GPS receiver has been delivered, and I will be installing it tomorrow.

rjhike
 
Posts: 15
Joined: Thu Jan 29, 2015 8:35 pm

Re: Ice Tube Clock firmware for newbie.

by jarchie on Tue Feb 10, 2015 6:46 pm

rjhike wrote:Thank you for all your help in getting the firmware and instructions!

You're very welcome!

rjhike wrote:I just ended up putting the chip in the clock and it worked. I didn't have to make any changes that were suggested in the troubleshooting page.

I guess that works too. :-) Since your EEPROM wasn't successfully programmed, it means that the default settings might be a bit bizarre, but you can change those through the clock menus.

rjhike wrote:Yes I would like the HH._MM._SS.

Okay. I'll look into it.

rjhike wrote:Maybe use the HH.MM.SS.PM without the PM, and use the indicator dot for PM?

So you're also thinking of another format like "_HH.MM.SS_" where the underscores are blank digits?

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Please be positive and constructive with your questions and comments.