Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 81
AUDSTART_SYSTEM_MELODY with the AUDCUSTOMEMELODY as the argument. To define the base
address of the custom melody pattern, use the macro AUDSETUP_MELODYADDRESS.
4.27.1 Melody Table Structure
A melody table consists of one or more melody patterns. A melody pattern contains a repetition count,
frequency and duration codes, and a control code. The control code is used to indicate the end of a melody
pattern. For a melody pattern that is repeated more than once, the control code signals the audio driver to
repeat the melody pattern. When the repetition count of the melody pattern is complete, the control code
indicates whether it is the end of the melody table or that another melody pattern exists. The maximum
size for each pattern is 255 bytes.
REP COUNT Indicates number of repetitions for current pattern. Maximum value is
255.
FREQ & DURATION A byte value indicating the frequency and duration. The frequency
data is stored in the upper nibble. The duration data is stored in the
lower nibble.
The available frequency codes are:
AUD1KHZ
AUD1p3KHZ
AUD1p6KHZ
AUD2KHZ
AUD2p3KHZ
AUD2p7KHZ
AUD3p2KHZ
AUD4KHZ
AUDNULL
The Duration is a value from 0 to 15. The actual time duration is
computed using the formula:
(
)
32
1
+
Duration
Maximum Time: 0.5 seconds
Minimum Time: 21.35 milliseconds
CONTROL CODE Indicates an end of a current melody pattern. Depending on the
control code being used, it signifies that another melody pattern exists
or this is the last pattern.
The available control codes are: