English
Language : 

Z8F0830HH020SG Datasheet, PDF (153/257 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore!® F0830 Series
Product Specification
135
Byte Write
To write a byte to the NVDS array, the user code must first push the address, then the data
byte onto the stack. The user code issues a CALL instruction to the address of the Byte
Write routine (0x20B3). At the return from the subroutine, the write status byte resides in
working register R0. The bit fields of this status byte are defined in Table 91. Additionally,
user code should pop the address and data bytes off the stack.
The write routine uses 16 bytes of stack space in addition to the two bytes of address and
data pushed by the user code. Sufficient memory must be available for this stack usage.
Because of the Flash memory architecture, NVDS writes exhibit a nonuniform execution
time. In general, a write takes 136 µs (assuming a 20 MHz system clock). For every 200
writes, however, a maintenance operation is necessary. In this rare occurrence, the write
takes up to 58 ms to complete. Slower system clock speeds result in proportionally higher
execution times.
NVDS byte writes to invalid addresses (those exceeding the NVDS array size) have no
effect. Illegal write operations have a 7 µs execution time.
Table 91. Write Status Byte
Bit
7
Field
Default
Value
0
6
5
4
Reserved
0
0
0
3
2
1
0
FE
IGADDR WE
0
0
0
0
Bit
Description
[7:3]
Reserved
These bits are reserved and must be programmed to 00000.
[2]
Flash Error
FE
If a Flash error is detected, this bit is set to 1.
[1]
Illegal Address
IGADDR When an NVDS byte writes to invalid addresses occur (those exceeding the NVDS array size),
this bit is set to 1.
[0]
Write Error
WE
A failure occurs during data writes to Flash. When writing data into a certain address, a read-
back operation is performed. If the read-back value is not the same as the value written, this bit
is set to 1.
PS025113-1212
NVDS Code Interface