M851 WristApp Design Guide Rev 1.2
Timex Corporation 75
The following section details how the fields in the database structures are computed. The diagram below
shows an example of a variable size random access database with 4 records.
Section Description
Allocation Size
A 16-bit quantity indicating the EEPROM usage of the database. This
value is always in multiples of 64. This optimizes the download speed
during communications. The allocation size is defined by the A and I
pointers.
AllocationSize = (((DatabaseSize-1)/64)+1)*64
Database Size
A 16-bit quantity indicating the actual size of the database. This is
computed by:
DatabaseSize = Offset(I) – Offset(A)
App Specific Header Size
An 8-bit quantity that indicates the number of bytes allocated for
application specific information. This section can also store information
about the database itself. It might be used after an upload of the database to
recreate the database in the PC.
AppSpecificHeaderSize = Offset(D) – Offset(C)
The required minimum size of this section is 0x02 (2 bytes for the number
of records.)