AT89C5122 ATMEL [ATMEL Corporation], AT89C5122 Datasheet - Page 28

no-image

AT89C5122

Manufacturer Part Number
AT89C5122
Description
MICROCONTROLLER WITH USB AND SMART CARD READER INTERFACES
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89C5122D-ALRUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-RDRIM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-RDRUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-RDVIM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-SISUM
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89C5122D-UM
Manufacturer:
MAXIM
Quantity:
1 001
Part Number:
AT89C5122DS-RDTUM
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
AT89C5122DS-UM
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Using CRAM Memory
The CRAM is a read / write volatile memory that is mapped in the program memory
space. Then when the power is switched off the code is lost and needs to be reload at
each power up. In return, the CRAM enables a lot of flexibility in the code development
as it can be programmed indefinitely. The user code running in the CRAM can perform
read operations in CRAM itself by means of MOVC instructions like any C51 microcon-
troller does. Although the writing operations in CRAM are usually handled by the
bootloader, it is possible for the user code to handle its own writing operations in CRAM
as well. The user code must call API functions provided by the bootloader in the ROM
memory. Refer to bootloader datasheet for further details about the use of these API
functions. These API functions use a mechanism provided by the AT8xC5122 microcon-
troller. When the bit RPS is set in RCON register (Table 8 on page 26), the MOVX
intructions are configured to write in CRAM instead of XRAM memory. However, due to
C51 architecture, it is not possible for the user code to write directly in CRAM when it is
itself running in CRAM. This is why the API functions must be called in order to have the
code executing in ROM while the CRAM is written.
Figure 12. Read / Write Mechanisms in CRAM Memory
API functions
BOOTLOADER
RPS=1
MOVX
Writing operation
CRAM
User code
API Call
Read operation
MOVC
AT8xC5122/23
28
4202D–SCR–06/05

Related parts for AT89C5122