|
|
(6 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | The [[Alpha Clock Five]] is an alarm clock and alphanumeric LED display development platform based on the ATmega644A AVR microcontroller. It can be programmed through an AVR ISP programmer, using standard AVR-GCC techniques, or through an FTDI USB-TTL interface, using a modified version of the Arduino development environment. | + | The [[Alpha Clock Five]] is an alarm clock and alphanumeric LED data display device based on the ATmega644A AVR microcontroller. |
| | | |
| | | |
| + | The current version, v. 2.0 of the Alpha Clock Five firmware is discussed [http://wiki.evilmadscience.com/Alpha_Clock_Firmware_v2 here]. |
| | | |
− | == Bootloader (Arduino style) programming ==
| + | The previous firmware version, v. 1.0 of the Alpha Clock Five firmware is discussed [http://wiki.evilmadscience.com/Alpha_Clock_Firmware_v1 here]. |
− | | |
− | Alpha Clock Five kits are preprogrammed with the [http://sanguino.cc/ Sanguino] Bootloader.
| |
− | | |
− | | |
− | === Setting up the environment ===
| |
− | | |
− | Alpha Clock Five requires a rather specialized programming environment, that uses some older software versions and will be updated in the near future.
| |
− | | |
− | | |
− | Required software:
| |
− | * Arduino 0023 (available [http://code.google.com/p/arduino/downloads/list?can=2&q=0023 here]), an older version of the [http://arduino.cc/ Arduino] development environment.
| |
− | * Sanguino version 0023r2.zip [http://code.google.com/p/sanguino/downloads/detail?name=Sanguino-0023r2.zip from here]. (This is an updated version of the Sanguino extensions to Arduino, by [http://ryanmsutton.com/2011/11/updated-dev-enviroment/ Ryan M Sutton].)
| |
− | | |
− | | |
− | Install the Arduino program on your computer. The Sanguino extensions need to be installed separately, and the method for that depend, very slightly, on your operating system:
| |
− | | |
− | | |
− | ==== Installing Sanguino: Mac ====
| |
− | | |
− | First unzip the Sanguino-0023r2.zip file, which reveals a folder called "Sanguino." Then, find the location where you need to install it.
| |
− | | |
− | | |
− | * Locate your Arduino.app file, version 0023 (which you may have just installed).
| |
− | * Ctrl-click the file to show the contextual pop-up menu.
| |
− | * From that menu, select "Show Package Contents."
| |
− | * Within the resulting directory (Arduino.app), navigate to the folder Contents > Resources > Java > hardware
| |
− | * Inside "hardware" there several folders, including one called "arduino." Copy the whole "Sanguino" folder, which you unzipped earlier into the hardware folder, next to "arduino."
| |
− | * Restart Arduino.
| |
− | | |
− | If the Sanguino software is installed correctly, you will see Sanguino options in your Tools>Board menu.
| |
− | | |
− | | |
− | ==== Installing Sanguino: Windows ====
| |
− | | |
− | First unzip the Sanguino-0023r2.zip file, which reveals a folder called "Sanguino." Then, copy that to within your Arduino application.
| |
− | | |
− | * Locate your Arduino application
| |
− | * Copy /Sanguino to arduino-0023/hardware/
| |
− | * You should end up with arduino-0023/hardware/Sanguino/
| |
− | * Restart Arduino.
| |
− | | |
− | If the Sanguino software is installed correctly, you will see Sanguino options in your Tools>Board menu.
| |
− | | |
− | | |
− | ==== Installing Sanguino: Linux ====
| |
− |
| |
− | First unzip the Sanguino-0023r2.zip file, which reveals a folder called "Sanguino." Then, copy that to within your Arduino application.
| |
− | | |
− | * Locate your Arduino application
| |
− | * Copy ~/Sanguino to arduino-0023/hardware/
| |
− | * You should end up with arduino-0023/hardware/Sanguino/
| |
− | | |
− | * Restart Arduino.
| |
− | | |
− | If the Sanguino software is installed correctly, you will see Sanguino options in your Tools>Board menu.
| |
− | | |
− | | |
− | === Uploading firmware ===
| |
− | | |
− | Connect your FTDI interface (e.g., USB-TTL cable) to location J2 on the circuit board (the 6-pin SIL right-angle header also labeled "LOGIC-LEVEL (TTL) SERIAL"), watching the polarity. For one of the cables with rainbow-wires on the end, black goes down, green goes up.
| |
− | | |
− | Make sure that the correct serial port is selected in the Tools>Serial Port menu.
| |
− | | |
− | Select "Sanguino W/ ATmega644P" from your Tools>Board menu
| |
− | | |
− | Make sure that Alpha Clock Five is powered on.
| |
− | | |
− | Click the "Upload" button in your Arduino window to upload the sketch.
| |
− | | |
− | | |
− | | |
− | === Programming the bootloader ===
| |
− | | |
− | Most users will not need to reprogram the bootloader at any point.
| |
− | | |
− | Programming the bootloader onto a new ATmega644A requires an AVR ISP programmer (see more about that below). This can be done directly from within the Arduino environment (using the Tools>Burn bootloader option), but is complicated by the fact that we are using an ATmega644A rather than the ATmega644P normally expected by Sanguino.
| |
− | | |
− | First, download and install [http://evilmadscientist.s3.amazonaws.com/source/alphafive/Sanguino_alphafive.zip this alternate version] (130 kB .zip file) of the Sanguino software, which includes a definition of the 644A for purposes of using the bootloader.
| |
− | | |
− | Then, to install the bootloader:
| |
− | * Select as your board type (from Tools>Board), "Sanguino W/ ATmega644/644A"
| |
− | * From Tools>Burn Bootloader, select your AVR ISP programmer type, to actually burn the bootloader
| |
− | | |
− | After installing the bootloader, select board type "Sanguino W/ ATmega644P" when you wish to reprogram the board through the bootloader, as the "software" device signatures returned by the bootloader are those for the '644P. If you reprogram the board through an ISP programmer (including reburning of the bootloader), you will still need to select ATmega644A as the device type.
| |
− | | |
− | | |
− | | |
− | === Technical note on device signature ===
| |
− | | |
− | The device signature that the Alpha Clock's bootloader returns is that of the ATmega644P (not the ATmega644A). This is intentional. It is (1) code compatible and (2) better supported under both AVR-GCC and the Arduino/Sanguino environments. There are longstanding bugs in support for the 644A, and this is a stable and sane workaround.
| |
− | | |
− | The "hardware" device signatures-- those that you will read if you try to reprogram the AVR through an ISP interface --do remain those of the ATmega644A.
| |
− | | |
− | | |
− | | |
− | == AVR ISP Programming ==
| |
− | | |
− | The Alpha Clock Five PCB features a 6-pin AVR ISP connector (J4), which can be used to program the microcontroller through any suitable AVR ISP programmer. We recommend the Adafruit [http://evilmadscience.com/productsmenu/tinykitlist/106-usbtiny USBtinyISP] programmer for most purposes. The Alpha Clock Five should be powered separately from 5 V while programming; Alpha Clock Five requires more power than can usually be safely provided by USB.
| |
− | | |
− | The circuit can be programmed through AVR-GCC or any other AVR software environment, including AVR Studio. If using AVR-GCC, you may find it helpful to target (set the MCU type as) the ATmega644P rather than the ATmega644A, as it is better supported.
| |
− | | |
− | Please refer to the [http://evilmadscientist.s3.amazonaws.com/source/alphafive/fiveletter.pdf schematics] (PDF) for pinouts and electrical features of the Alpha Clock Five.
| |
− | | |
− | | |
− | == Standard Firmware ==
| |
− | | |
− | | |
− | === Version 1.0 ===
| |
− | | |
− | Version 1.0 of the Alpha Clock Five firmware is available [http://evilmadscientist.s3.amazonaws.com/source/alphafive/alphaclock_18_Rev1_0.pde here] (49 kB .pde file).
| |
− | | |
− | Besides the Arduino 0023/Sanguino-0023r2 environment described earlier, this code requires that you install the "old" DateTime library (really, both the DateTime and DateTimeStrings libraries that are included with the download) , available [http://www.arduino.cc/playground/Code/DateTime here]. These should be installed like regular Arduino libraries, within the "libraries" directory of your sketch folder.
| |
− | | |
− | | |
− | === Planned future versions ===
| |
− | | |
− | A future version of the Alpha Clock Five firmware is planned, which will-- as its major change --use a more up-to-date software environment. Planned improvements include the use of Arduino 1.0, updated Sanguino components, the new Arduino Time library, and compatibility with updated versions of the serial and I2C libraries within Arduino.
| |
− | | |
− | Planned future features include:
| |
− | * Additional display modes
| |
− | * Expanded serial communication, with additional commands
| |
− | * Expanded serial communication, using the second serial port for daisy-chained displays
| |
− | | |
− | | |
− | Code contributions and are welcome, of course, and we will be setting up a formal repository in the near future. In the mean time, please [http://www.evilmadscientist.com/staticpages/index.php/contact contact Evil Mad Scientist Laboratories] if you are interested in contributing.
| |
− | | |
− | | |
− | == Alternate "Demo" firmware ==
| |
The previous firmware version, v. 1.0 of the Alpha Clock Five firmware is discussed here.