DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

ADUC812(1999) 查看數據表(PDF) - Analog Devices

零件编号
产品描述 (功能)
生产厂家
ADUC812 Datasheet PDF : 31 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
ADuC812
A block diagram of the SFR registered interface to the User
Flash/EE Memory array is shown in Figure 12.
Flash/EE Memory Write and Erase Times
The typical program/erase times for the User Flash/EE Memory
are:
FUNCTION:
HOLDS THE 8-BIT PAGE
ADDRESS POINTER
FUNCTION:
HOLDS THE 4-BYTE
PAGE WORD
9FH BYTE 1 BYTE 2 BYTE 3 BYTE 4
Erase Full Array (640 Bytes) – 20 ms
Erase Single Page (4 Bytes) – 20 ms
Program Page (4 Bytes)
– 250 µs
Read Page (4 Bytes)
– Within Single Instruction Cycle
EADRL
EDATA1 (BYTE 1)
EDATA2 (BYTE 2)
EDATA3 (BYTE 3)
EDATA4 (BYTE 4)
00H BYTE 1 BYTE 2 BYTE 3 BYTE 4
ECON COMMAND
INTERPRETER LOGIC
FUNCTION:
HOLDS COMMAND WORD
ECON
FUNCTION:
INTERPRETS THE FLASH
COMMAND WORD
Figure 12. User Flash/EE Memory Control and
Configuration
ECON—Flash/EE Memory Control SFR
This SFR acts as a command interpreter and may be written
with one of five command modes to enable various read, pro-
gram and erase cycles as detailed in Table VI:
Table VI. ECON–Flash/EE Memory Control Register
Command Modes
Command Byte Command Mode
01H
02H
03H
04H
05H
06H
07H to FFH
READ COMMAND
Results in four bytes being read into
EDATA 1–4 from memory page location
contained in EADRL .
WRITE COMMAND
Results in four bytes (EDATA 1–4) being
written to memory page location in EADRL.
This write command assumes the de-
signated “write” page has been pre-erased.
RESERVED COMMAND
“DO NOT USE”
VERIFY COMMAND
Allows the user to verify if data in EDATA
1–4 is contained in page location designated
by EADRL. A subsequent read of the
ECON SFR will result in a “zero” being
read if the verification is valid, a nonzero
value will be read to indicate an invalid
verification.
ERASE COMMAND
Results in an erase of the 4-byte page
designated in EADRL.
ERASE-ALL COMMAND
Results in erase of the full user memory
160-page (640 bytes) array.
RESERVED COMMANDS
Commands reserved for future use.
Using the Flash/EE Memory Interface
As with all Flash/EE memory architectures, the array can be pro-
grammed in system at a byte level, although it must be erased
first; the erasure being performed in page blocks (4-byte pages
in this case).
A typical access to the Flash/EE array will involve setting up the
page address to be accessed in the EADRL SFR, configuring the
EDATA1-4 with data to be programmed to the array (the
EDATA SFRs will not be written for read accesses) and finally
writing the ECON command word which initiates one of the
five modes shown in Table VI.
It should be noted that a given mode of operation is initiated as
soon as the command word is written to the ECON SFR. At
this time the core microcontroller operation on the ADuC812
is idled until the requested Program/Read or Erase mode is
completed.
In practice, this means that even though the Flash/EE memory
mode of operation is typically initiated with a 2 machine cycle
MOV instruction (to write to the ECON SFR), the next
instruction will not be executed until the Flash/EE operation
is complete (250 µs or 20 ms later). This means that the core
will not respond to Interrupt requests until the Flash/EE
operation is complete, although the core peripheral functions
like Counter/Timers will continue to count and time as configured
throughout this pseudo-idle period.
ERASE-ALL
Although the 640-byte User Flash/EE array is shipped from the
factory pre-erased, i.e., Byte locations set to FFH, it is nonethe-
less good programming practice to include an erase-all routine
as part of any configuration/setup code running on the ADuC812.
An “ERASE-ALL” command consists of writing “06H” to the
ECON SFR, which initiates an erase of all 640 byte locations in
the Flash/EE array. This command coded in 8051 assembly
would appear as:
MOV ECON, #06H
; Erase all Command
; 20 ms Duration
PROGRAM A BYTE
In general terms, a byte in the Flash/EE array can only be
programmed if it has previously been erased. To be more spe-
cific, a byte can only be programmed if it already holds the value
FFH. Because of the Flash/EE architecture this erasure must
happen at a page level, therefore a minimum of four bytes (1 page)
will be erased when an erase command is initiated.
A more specific example of the Program-Byte process is shown
graphically in Figure 13. In this example the user will write F3H
into the second byte on Page 03H of the User Flash/EE Memory
space.
However, Page 03H already contains four bytes of valid data,
and as the user is only required to modify one of these bytes, the
full page must be first read so that this page can then be erased
without the existing data being lost.
14
REV. 0

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]