71M6521 Demo Board User’s Manual
Page: 22 of 111
© 2005-2009 TERIDIAN Semiconductor Corporation
Revision 2.18
1.7.4 COMMUNICATING VIA INTEL HEX RECORDS
Due to memory restrictions, the text-based command line interface contained in the 71M6521FE Demo
Code is not available for the 71M6521BE and 71M6521DE Demo Codes. In addition, the 16KB version of
the Demo Code stores the CE data in EEPROM (this saves valuable flash memory space). The 8KB version
of the Demo Code avoids the code-intensive storage on EEPROM and uses flash memory, instead.
Communication with the Demo Codes written for the 71M6521BE and 71M6521DE ICs is accomplished
using a simplified protocol based on Intel Hex records. These records can still be sent and received with an
ordinary terminal, and coding and decoding of commands and responses is straightforward.
These differences of implementation result in slightly different behavior of the Demo Code. These
differences are listed in chapters 1.7.4.1 and 1.7.4.2.
In the command line interface of the 71M6521FE Demo Code, a transition to Intel hex format can be initiated
by typing “CLC”. To revert to the regular CLI, the reset button must be pushed.
1.7.4.1 71M6521DE (16KB)
On start-up, the 16KB version of the Demo Code transfers the CE data from EEPROM into the CE DRAM. If,
for some reason, the EEPROM is erased, or CE data is compromised, the CE will be halted and the HELLO
prompt will be displayed until the user supplies CE data via the UART.
When receiving a <CR> <LF> character combination from the terminal, the 16KB Demo Code will send an
asterisk (“*”). This character serves as a feedback to the user, signaling that the Demo Board is functional
and that the serial connection is set up properly.
1.7.4.2 71M6521BE (8KB)
On start-up, the 8KB version of the Demo Code transfers the CE data from flash memory into the CE DRAM.
The flash memory contains default settings when the Demo Board is used for the first time. After the HELLO
prompt, the Demo Board will display the last stored energy value on its LCD.
When receiving a <CR> <LF> character combination from the terminal, the 16KB Demo Code will send a
line-feed character followed by an asterisk (“*”). This character serves as a feedback to the user, signaling
that the Demo Board is functional and that the serial connection is set up properly.
Sending the semicolon character from the terminal to the 8KB Demo Code will cause the Demo Code to
repeat the last command. This is useful when examining the same memory location several times, as
sometimes required when checking the development of temperature, voltage, or energy values over time.
1.7.4.3 Using the Hex-Record Format
Intel's Hex-record format allows program or data files to be encoded in a printable (ASCII) format, allowing
editing of the object file with standard tools and easy file transfer between a host and target. An individual
Hex-record is a single line in a file composed of one or several Hex-records.
Hex-Records are character strings made of several fields which specify the record type, record length,
memory address, data, and checksum. Each byte of binary data is encoded as a 2-character hexadecimal
number: the first ASCII character representing the high-order 4 bits, and the second the low-order 4 bits of
the byte. The six fields that comprise a Hex-record are defined in Table 1-7.