The information in this article applies to:
- RC8650
- RC8660
- V8600A
- V-Stamp
- DoubleTalk LT
The RC8650 supports a programmable exception dictionary that can be used to change the way the RC8650 responds to text strings. Although the dictionary 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 dictionary has been corrupted, so further action can be taken if necessary.
Implementation
When the RC8650 begins speaking, it activates the TS0 pin and, if enabled with the STM bit of the POR register, transmits the start-of-speech character “s” via the TXD pin. However, if you send the RC8650 a string that doesn’t produce any output (such as a string composed entirely of control characters or punctuation that is filtered by the Punctuation Filter), nothing will happen.
We can utilize this behavior to detect the presence of an exception dictionary. For example, the dictionary entry
(\02)=.
assigns a pause (which is still considered to be “speech” by the RC8650’s definition, thus asserting the TS0 pin) to the CTRL+B character. If this entry is present in a valid, enabled dictionary, the RC8650 will generate a pause wherever the CTRL+B character appears in the input stream. If the dictionary has not been loaded, or is disabled, the CTRL+B character will be ignored. We chose a control character for the dictionary entry, because 1) the character must not normally produce any output, and 2) it should not occur in the data stream expected to be present in the application. A pause was chosen as the output to avoid anything being heard by the user.
To test for the presence of the dictionary, all we need to do is send CTRL+B (in this example) followed by the usual CR terminator. Then we wait a short period of time to see if the RC8650 spews forth the expected “s” character on the TXD pin (make sure POR.0 is set to “1,” or the character will not be sent). If the character is not received, we can assume that the dictionary is not present and needs to be downloaded again. Note that if your application monitors the TS0 pin, the pin may be checked for activity instead of monitoring the TXD pin. |