The information in this article applies to:
- RC8650
- RC8660
- V8600A
- V-Stamp
- DoubleTalk LT
The RC8650 supports a programmable greeting message that is automatically played immediately after the device is reset. This mechanism allows a custom message to be played and/or the RC8650’s default settings to be reconfigured. Although the greeting message is stored in a protected area of the RC8650’s flash memory, it is possible to be accidentally erased or overwritten. This application note describes a method that can be used to detect if the greeting message has been corrupted, so further action can be taken if necessary.
Implementation
The best way to determine if a greeting message is present, is to have the RC8650 tell you if it's present. This can be easily accomplished using an index marker (nI command).
When an index marker command is executed, the RC8650 transmits the marker number (“n”) via the TXD pin. If you include a marker command in the greeting message, the marker number will be transmitted to the host controller every time the RC8650 is reset. For example, the message string
Ready \0165i
says the word “ready,” then transmits 0x41 (corresponding to the 65 in the marker command) to the host controller via the TXD pin. If the marker is not received, you can assume that the greeting message is not present and needs to be downloaded again. (Note: the message string above follows the command syntax used in RCStudio text boxes. The greeting message can be easily created using RCStudio’s Create Greeting command in the Utilities menu.)
Important: If the RC8650’s baud rate has been configured for auto-detection with the BRS pins, the greeting message must program the baud rate to match that of the host controller in order for this technique to work. Otherwise, the marker will not be transmitted, because the baud rate has not yet been determined. After the index marker has been transmitted, the baud rate can be reset for auto-detection. The following example programs the baud rate for 9600 baud, transmits the index marker, then reprograms the baud rate for auto-detection:
\015h \0165i, \017h
The comma appearing after the marker command creates a short delay to ensure that the marker has been completely transmitted before the 7h (auto-detect) command is executed. Note also that this example doesn’t say anything, as the previous example did.
Also, consider changing the marker number anytime you change the greeting message content; this allows you to determine not only if the message is present, but if the correct version is present. For example, if a new version of the above greeting message needed to be created, you might change the marker command from 65i to 66i.
If you need to delay the transmission of the marker in order to allow the rest of your system to stabilize after a system-wide reset, you can include one or more punctuation marks in front of the marker command. Periods and commas are recommended; a period generates a delay roughly twice as long as a comma. |