EVAL-ADUC832QSZ Analog Devices Inc, EVAL-ADUC832QSZ Datasheet - Page 49
![KIT DEV FOR ADUC832 QUICK START](/photos/9/24/92469/eval-aduc832qs_sml.jpg)
EVAL-ADUC832QSZ
Manufacturer Part Number
EVAL-ADUC832QSZ
Description
KIT DEV FOR ADUC832 QUICK START
Manufacturer
Analog Devices Inc
Series
QuickStart™ Kitr
Type
MCUr
Specifications of EVAL-ADUC832QSZ
Contents
Evaluation Board, Cable, Power Supply, Software and Documentation
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
ADuC832
Lead Free Status / RoHS Status
Compliant, Lead free / RoHS Compliant
Other names
EVAL-ADUC832QS
EVAL-ADUC832QS
EVAL-ADUC832QS
EXAMPLE: PROGRAMMING THE FLASH/EE DATA
MEMORY
To program F3H into the second byte on Page 03H of the
Flash/EE data memory space while preserving the other three
bytes already in this page, a typical program of the Flash/EE
data array includes the following steps:
1.
2.
3.
Step 1: Set Up the Page Address
The two address registers, EADRH and EADRL, hold the high
byte address and the low byte address of the page to be
addressed.
The assembly language to set up the address may appear as:
MOV EADRH,#0
MOV EADRL,#03H
Step 2: Set Up the EDATA Registers
Next, write the four values to be written into the page into the
four SFRs, EDATA1 to EDATA4. Unfortunately, three of these
are unknown. Thus, the current page must be read and the
second byte overwritten.
MOV ECON,#1
MOV EDATA2,#0F3H
Step 3: Program Page
A byte in the Flash/EE array can only be programmed if it has
previously been erased; that is, a byte can only be programmed
if it already holds the value FFH. Because of the Flash/EE architec-
ture, this erase must happen at a page level; therefore, a minimum
of four bytes (one page) is erased when an erase command is
initiated. Once the page is erased, the four bytes can be pro-
grammed in-page and then a verification of the data performed.
MOV ECON,#5
MOV ECON,#2
MOV ECON,#4
MOV A,ECON
JNZ ERROR
Although the 4 kB of Flash/EE data memory are shipped from
the factory pre-erased, that is, byte locations set to FFH, it is
Setting EADRH/L with the page address
Writing the data to be programmed to EDATA1 to
EDATA4
Writing the ECON SFR with the appropriate command
; ERASE Page
; WRITE Page
; VERIFY Page
; Check if ECON = 0 (OK!)
; Set Page Address Pointer
; Read Page into EDATA1 to
EDATA4
; Overwrite Byte 2
Rev. A | Page 49 of 92
nonetheless good programming practice to include an erase-all
routine as part of any configuration/setup code running on the
ADuC832. An erase all command consists of writing 06H to the
ECON SFR, which initiates an erase of the 4 kB Flash/EE array.
This command coded in 8051 assembly appears as:
MOV ECON,#06H
FLASH/EE MEMORY TIMING
Typical program and erase times for the ADuC832 are as
detailed in Table 22 and Table 23.
Table 22. Normal Mode (Operating on Flash/EE Data
Memory)
Instruction
READPAGE (4 bytes)
WRITEPAGE (4 bytes)
VERIFYPAGE (4 bytes)
ERASEPAGE (4 bytes)
ERASEALL (4 kB)
READBYTE (1 byte)
WRITEBYTE (1 byte)
Table 23. ULOAD Mode (Operating on Flash/EE Program
Memory)
Instruction
WRITEPAGE (256 bytes)
ERASEPAGE (64 bytes)
ERASEALL (56 kB)
WRITEBYTE (1 byte)
Note that a given mode of operation is initiated as soon as
the command word is written to the ECON SFR. The core
microcontroller operation on the ADuC832 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 two-machine
cycle MOV instruction (to write to the ECON SFR), the next
instruction is not executed until the Flash/EE operation is com-
plete. This means that the core does not respond to interrupt
requests until the Flash/EE operation is complete, although the
core peripheral functions such as counter/timers continue to
count and keep time as configured throughout this period.
; Erase all Command
; 2 ms Duration
Time
−5 machine cycles
−380 μs
−5 machine cycles
−2 ms
−2 ms
−3 machine cycle
−200 μs
−15 ms
Time
−2 ms
−2 ms
−200 μs
ADuC832