DA6502.008
29 November 2012
EEPROM SPECIAL FUNCTIONS
Register (3AHEX) controls the special EEPROM
functions that includes EEPROM block erase, write
and test functions. See table 5. The EEPROM
control register functions are not needed in normal
EEPROM use such as read and write operations.
Setting the EEPROM control register bit 7 (EBE) to
1 will erase the EEPROM memory block (128 bits)
specified by the A4 bit. Erased memory block
consists of zeroes.
Setting bit 6 (EBW) to 1 will force the EEPROM
memory block specified by the A4 bit to be
programmed to the same 8-bit word found in the
EEPROM data input register (39HEX).
The 256-bit EEPROM consists of two 128-bit
blocks, so block erase and block write applies only
to one half of the EEPROM, selectable by the A4
address bit (see table 1). To erase or write the
whole EEPROM, block erase or write needs to be
done twice: for A4=0 and for A4=1. It is
recommended to not use block erase or write
functions to avoid accidental internal oscillator
trimming data overwriting at A4=0 memory block.
Note: after block operations the block erase (EBE)
or write (EBW) control bit need to be written back to
value 0 to return normal operation.
Table 5. MAS6502 EEPROM control register (3AHEX
)
Bit Number
Bit Name
Description
Value
Function
7
EBE
EEPROM Block Erase
0
1
0
1
-
Erase 128-bit block of EEPROM
-
Write EEPROM data input
register (39HEX ) data into 128-bit
block of EEPROM
-
6
EBW
EEPROM Block Write
5
EETEST
VEE[1:0]
EEPROM Test Mode
Enable
0
1
Test mode enabled
Internal high test read
Internal low test read
FORBIDDEN
4-3
EEPROM test read
mode selection
11
10
00
01
0
FORBIDDEN
2
CPTEST
Charge pump test
input pin
Programming allowed
Output protection of CP disabled
TBD
1
1
DMA
PARITY
Direct Memory Access
Parity Access
TBD
TBD
0
TBD
TBD = To be defined
The MAS6502 EEPROM status register (3CHEX), bits (7:6), reflect the EEPROM operation status. See table 6.
This register can be used to verify that the EEPROM operation has been accomplished without errors.
Table 6. MAS6502 EEPROM status register (3CHEX). Only bits (7:6) are used.
Bit Number
Bit Name
Description
Value
Function
7
ERROR
EEPROM error
detection
0
1
0
1
X
No errors
1 (or more) data error(s)
No errors
2 (or more) data errors
-
6
DED
EEPROM double
error detection
5-0
X = Don’t care
10 (20)