
You should use the Timer Setup Program if you can!
The setup commands are documented below, in case you cannot use the setup program for some reason, or are just curious about how it works.
| String | Command | Action |
|---|---|---|
| zap | Enter configuration mode |
Puts the timer into configuration mode. Only configuration requests will
be accepted until configuration mode is exited, or the board is powered off.
Normal race commands not processed and the timer is not in a normal operating mode.
Only the setup commands listed below are accepted.
This command must be in lower case. Capital ZAP will be ignored. This sequence was chosen because none of the letters correspond to a normal race command.
You can think of it as a setup password if you wish.
If this command is received by the timer during a race, the race will be interrupted.
|
| The following commands must be in UPPER CASE (ALL CAPS). | ||
| X | Exit configuration mode | Puts the timer back into normal operating mode. |
| Finish Line Sensor Triggering Configuration | ||
| F1 | Finish triggered on pin high | A finish is triggered when the input pin from the finish line goes high (+5v). The normal (sensor illuminated) state is low (0v/gnd.) |
| F0 | Finish triggered on pin low | A finish is triggered when the input pin from the finish line goes low (0v/gnd). The normal (sensor illuminated) state is high (+5v.) |
| F? | Get Finish mode | Timer will return F0 or F1 to indicate one of the above states |
| Lane Configuration | ||
| L? | Get active lanes | This will query the timer for the active lane mask. This will return L followed by 8 digits. Each digit is either 1 or 0. The first two digits are always 00. The remaining 6 digits indicate the state of lanes 6, 5, 4, 3, 2, and 1 respectively. A value of 1 indicates that lane is active and will be monitored. A value of 0 indicates the lane is not used. |
| L00111111 | Set active lanes | Must be L followed by 8 digits. Each digit must be either 1 or 0. This sets which lanes the timer will monitor. The bit mask must begin with 00 since there are only 6 lanes. The remaining 6 digits set the state for lanes 6, 5, 4, 3, 2, and 1, in that order. The valid values for the last 6 digits are 1 to indicate a lane is used, and 0 to indicate that the lane is not used. Unused lanes are ignored. This is used to tell the timer which lanes are hooked up in your hardware configuration. |
| Race Timeout Configuration | ||
| Txxx | Set race Timeout | Must be T followed by 3 digits. Sets the timeout after which the timer will end a race even if not all lanes have finished. Set to 000 to disable this timeout. Valid values are 001 to 255. |
| T? | Get race Timeout | Timer will return the timeout in the format Txxx where each x is a digit 0 - 9 |
| 7-Segment LED Display Configuration (Display settings only apply to the 16F877A advanced timer version) | ||
| S1 | Segments are active high | This indicates that the timer should set a segment pin high (+5v) to turn on that LED segment. The off state for the segment is low (0v/gnd) |
| S0 | Segments are active low | This indicates that the timer should set a segment pin low (0v/gnd) to turn on that LED segment. The off state for the segment is high (+5v) |
| S? | Get Display Segment mode | Timer will return S0 or S1 to indicate one of the above states |
| D1 | Digit Select is active high | This indicates that the timer should set a digit select pin high (+5v) to turn on that LED digit. The off state for the digit is low (0v/gnd) |
| D0 | Digit Select is active low | This indicates that the timer should set a digit select pin low (0v/gnd) to turn on that LED digit. The off state for the digit is high (+5v) |
| D? | Get Digit Select mode | Timer will return D0 or D1 to indicate one of the above states |
These settings are saved in the EEPROM on the chip, and should only have to be done once. They will be remembered even if the timer is powered off for months (or years). This is a one-time setup, and should never have to be done again, unless you program new firmware on to your chip, which would probably erase everything. Most PIC programmers, including ICPROG, erase the EEPROM when they load a program to the chip.
If you use the Windows Timer Setup program, you can save your configuration settings to a file on your PC, so that they can be easily reloaded after re-flashing the chip by simply loading the file into the setup program.
Race Timer Software Interface Protocol