The MONOCHRON was explicitly designed to allow users to create their own firmware for the clock using our code base. Once you have built and tested your clock, you can choose one of our existing designs or, of course, write your own!
There are two ways to update the clock. One is to reprogram the entire chip using an AVR programmer. The other is to use a bootloader that is pre-programmed onto the chip that allows the chip to re-program itself. An AVR programmer is more powerful: you can really mess with anything on the chip and the entire 32K of memory is available. Using the bootloader is safer: there's no way to mess with the fuse settings (which could brick the chip) but you only get 30K of memory since 2K is used by the bootloader. Not a big deal, but if you are making some massive clock which requires tons of flash space, you may need it.
For a lot more information about AVR programmers and bootloaders, I strongly recommend reading this short article.
Note that to program an AVR you need an AVR programmer, but to upload using the bootloader you need a computer-serial connection (such as an FTDI cable). Unfortunately, they are not the same device so unless you have both, you should pick one to start with. If you're not a microcontroller wiz, I suggest going with the bootloader (FTDI) method. It's as fast (or faster), allows you to debug as well, and there's virtually no way to damage/brick the chip by messing with the fuses. If you're familiar with microcontroller programming, and you have a programmer, then feel free to go that direction.
The first thing you must do, no matter which way you go, is to install the software for communicating with the monochron!
Unless you've already done some microcontroller hacking, you should install the AVR development system on your computer. For windows, I suggest WinAVR (see here for my tutorial). For Mac, AVRMacPack seems to be the best choice (see here for my tutorial). For linux, you'll have to do some package installing, which depends a bit on your distro: I suggest googling for the best way for your distro, or if you are willing to do it 'from scratch', my tutorial will take you through step-by-step.
Either way, make sure that when you are done, you can open up a command window or terminal, and type in avrdude to get the following. If you get a respose that avrdude "isn't found" or "isn't recognized" go back and make sure you installed the software properly according to the tutorials!
Since it's going to be more common, we'll be covering how to use the FTDI adapter first. Nearly all of this tutorial is just getting everything set up and installed, it only has to happen once!
Step #1 is to plug in your FTDI adatper. If you have an FTDI cable proper, there is already a USB A connector on the end.
Next up, plug it into your computer! If you are using Windows you may hear a sound from the computer and a little popup bubble in the bottom right corner of the screen that says Found New Hardware FT232R USB UART
OK now we will verify that the driver installed properly.
Under Mac, in the Terminal window, type in ls /dev/cu.* which should give the following responses or so:
The name we are looking for is /dev/cu.usbserial-XXXX where the X's are going to be unique for each cable. Copy and paste the name into a text file so you'll remember it for later.
For Linux/Unix type ls /dev/ttyUSB* into a terminal window, you should see a device file called something like ttyUSB0
Look for an entry under Ports (COM & LPT) that says USB Serial Port (COM) the COM number may vary but it should be something like COM3 or COM4 the COM number may be as high as COM99 so just look for the USB serial port. The COM stands for "communication", and each one has a unique number, known as the COM Port number. In this case the COM Port number is COM3. If you don't see the COM port verify the cable is plugged in, and check that you installed the VCP FTDI driver.
Then right click and select Properties
Whew! OK now you are good to go for the next step
Plug in your clock, and verify it's working. Next plug in the FTDI adapter (if it's not plugged in yet).
Open up a command window (Windows), or terminal (Mac/Linux/Unix) and type in the following command (dont hit return yet!)
avrdude -c arduino -p m328p -P -b 57600
Where is something like COM3 or /dev/ttyUSB0
Remember don't hit return yet!
Now look again at your FTDI cable or adapter. If you have a cable you'll notice that one wire is Black.
The most important part is that you will see AVR device initialized a bar of #'s and then text that says Device signature and Fuses OK This means you've successfully talked to the bootloader! Yay! Go have a cup of your favorite drink.
If you're having problems, go back to the previous step and try to get the clock to reset. If you're having problems still, post up in the forums!
Now that you have all that set-up stuff ready, you can get to the fun part. Let's install SevenChron, for example, on our clock.
Go to the clock listing page, and click on the link that says "Code at Github" then click Download Source and save the zip or tar file onto your computer. Then uncompress it and find the file called monochron.hex in the firmware subfolder and copy it to your home directory (or to C:\ if you're using Windows).
Back to your command window:
Go to the directory where the file is at. If you're using windows, type in and press return
For mac or linux
Now, we will issue the reprogramming command. Type in the following, don't press return!
For windows: avrdude -c arduino -p m328p -P -b 57600 -U flash:w:C:\monochron.hex
For Mac/Linux: avrdude -c arduino -p m328p -P -b 57600 -U flash:w:~/monochron.hex
Basically, you can hit the up arrow twice and then type in "-U flash:w:monochron.hex" at the end. This will write the flash with the new firmware file. Press the FTDI adapter against the clock as before and hit return, keep pressing against the cable for about 30 seconds until the entire process is complete.
MONOCHRON® is a registered trademark of Adafruit Industries