
Microcontroller Programming
4-12
T8xC5121 Starter Kit User Guide
4186E–SCR–05/04
When the download is achieved, the Bootloader runs the program.
This process has duration of 7.5 seconds at 14.7456 MHz.
Figure 4-2. Bootloader Diagram
As specified in the T89C5121 datasheet, the two highest addresses of the 16K bytes
code must contain the program CRC and the bootloader compares with computed CRC
to launch (or not) the program execution.
The CRC value can be calculated with FLIP Software: the user must load the Hex file
and press the button: CRC.
The updated buffer can then be saved as a new Hex file including the two CRC bytes.
CAUTION: The Jumper JP14 (LED1) must be removed. Otherwise the TWI Clock signal
will not be at the correct levels.
4.2.2
Programming from
RS-232 source
A serial cable must first be attached between COM PC port and J2 DB9 connector of the
Demonstration board.
After Reset, if a AT24C128 EEPROM has not been detected at U1, the on-chip ROM
Bootloader tests if the UART receives ‘U’ (0x55) characters. Then, commands can be
sent to the microcontroller, using FLIP software. The programming sequence is detailed
in Section 5.
When the Program command is processed, the Internal EEPROM is programmed at the
same time as CRAM.
The program execution can be launched from FLIP (RUN Application Button).
Figure 4-3. Serial Programming Diagram
External
Serial
EEPROM
AT24C128
Internal
on-chip
EEPROM
Code
RAM
16K bytes
TWI
T89C5121
Internal
on-chip
EEPROM
Code
RAM
16K bytes
T89C5121
RS-232
J2