Editing Alpha Clock Serial

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
The standard [[Alpha Clock Firmware]] for [[Alpha Clock Five]] has a built in serial interface protocol that supports several basic functions, including time sync and displaying text on the alphanumeric LED display.
+
The standard [[Alpha Clock Firmware]] for [[Alpha Clock Five]] has a built in serial interface protocol that supports several simple functions, including time sync and displaying text on the alphanumeric LED display.
  
  
Line 6: Line 6:
 
The serial interface is a "TTL Serial" type, connected directly to the microcontroller, and supports logic-level signals only.  The interface is normally configured for 19,200 baud, 8N1.
 
The serial interface is a "TTL Serial" type, connected directly to the microcontroller, and supports logic-level signals only.  The interface is normally configured for 19,200 baud, 8N1.
  
For most applications a USB-TTL interface such as the [http://shop.evilmadscientist.com/productsmenu/partsmenu/130-usbttl FTDI TTL-232R] or the Adafruit [http://shop.evilmadscientist.com/productsmenu/accessories/210 FTDI Friend] is an excellent choice.
+
For most applications a USB-TTL interface such as the [http://evilmadscience.com/productsmenu/partsmenu/130-usbttl FTDI TTL-232R] or the Adafruit [http://evilmadscience.com/productsmenu/accessories/210 FTDI Friend] is an excellent choice.
 
The FTDI interface connects to location J2 on the circuit board.
 
The FTDI interface connects to location J2 on the circuit board.
  
Line 57: Line 57:
 
   
 
   
 
Note that the set of characters available (ASCII 32-96) is defined in the firmware.  If you need to display characters not in that set, or would like to change the shape of the displayed characters, that can be made possible by editing and uploading a new version of the firmware.  
 
Note that the set of characters available (ASCII 32-96) is defined in the firmware.  If you need to display characters not in that set, or would like to change the shape of the displayed characters, that can be made possible by editing and uploading a new version of the firmware.  
 
 
To blank the display, you can send an string consisting of spaces, "    ".
 
 
 
==== MT: Mode Time ====
 
 
The MT function is used to resume normal display mode-- showing the time --after command A0 has been issued.
 
 
 
The full command consists of 13 bytes, as follows:
 
* The header byte, 0xFF
 
* The command MT
 
* A 10-character string (the contents of this string will be ignored).
 
 
 
Please see the Sample Programs section below for an example program that displays characters with A0, and then uses MT to display the time again.
 
  
  
 
== Sample programs ==
 
== Sample programs ==
 
Sample applications to communicate with Alpha Clock Five are provided as .pde files, for use with the Processing development environment.  Processing is a free, cross-platform programming environment, and you can download your copy [http://processing.org/ at processing.org].
 
 
 
==== AlphaClock_SetText ====
 
 
Download this file [http://evilmadscientist.s3.amazonaws.com/source/alphafive/AlphaClock_SetText.pde here] (2 kB .pde file). 
 
 
When you run the application, it presents a window.  Click your mouse in the window to alternately display a text string ("ALPHA", plus some added decimal points) and to resume clock display.  This demonstrates the use of the A0 and MT serial functions.
 
 
Note that you may need to edit the file to select the correct serial port, defined by the "portIndex" variable, in order to select the serial port where your clock is attached.
 
 
 
==== AlphaClock_SetTime ====
 
 
Download this file [http://evilmadscientist.s3.amazonaws.com/source/alphafive/AlphaClock_SetTime.pde here] (2 kB .pde file). 
 
 
When you run the application, it presents a window.  Click your mouse in the window to set the time on the clock to your present computer system time.  This demonstrates the use of the ST function, and also provides an accurate way to set the display time.
 
 
Note that you may need to edit the file to select the correct serial port, defined by the "portIndex" variable, in order to select the serial port where your clock is attached.
 
 
 
 
 
 
== Additional Reserved Namespaces ==
 
 
The listed function names are reserved for use in future firmware.  If you extend the firmware with additional serial command functions, it is strongly advised that you do not use the following function names:
 
 
* A*  (A, followed by any character)
 
* B*  (B, followed by any character)
 
* SA  (May be used for Set Alarm time in future firmware)
 
* SB  (May be used for Set Brightness in future firmware) 
 
* M*  Where * is in the range 2-9. (May be used for mode setting in future firmware)
 
* TP  (May be used for producing sounds in future firmware)
 

Please note that all contributions to Evil Mad Scientist Wiki are considered to be released under the GNU Free Documentation License 1.3 (see Evil Mad Scientist Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)