Rainbow Electronics AT89C5122 User Manual

Page 27

Advertising
background image

27

AT8xC5122/23

4202E–SCR–06/06

When pin EA =1 and after the reset, the MCU begins the execution of the embedded
bootloader from location F800h of the ROM. The bootloader implements an In-System
Programming (ISP) mode which manages the transfer of the code in the volatile Pro-
gram Memory (CRAM).

For CRAM version, the code is supplied by the ATMEL’s FLexible In-system Program-
ming software (FLIP) through USB or UART interface

For E2PROM version, the code is supplied from the internal code E2PROM or by FLIP.
The state of pin P3.7 at reset determines the code source. If P3.7=1 (reset condition)
the source is the internal E2PROM and the transfer takes about 1.5 seconds. If P3.7=0
the source is FLIP and the transfer time depends mainly on external conditions not
related to bootloader.

Once the code is running in CRAM, the roll-over condition (code fetched beyond
address 7FFFh) depends on the state of ENBOOT bit of AUXR1 register (Table 6 on
page 25)
.

If ENBOOT=1 (reset condition) the MCU fetches the code from bootloader ROM. If
ENBOOT=0, the MCU fetches the code from the external Program Memory. In this last
case, PSEN is activated and Ports P0 and P2 are used to emit data and address
signals.

Warning : external Program Memory access is not allowed on Low Pin Count
Packages.

7FFFh

0000h

7EFFh

7F00h

Reserved

User code

Bootloader

FFFFh

P3.7

AT8xC5122 Microcontroller

Advertising