
Preliminary/Confidential
Subject to change without notice
W88227F/W88227QD
- 95 -
1999/10/1 Rev: 0.70
2.3.3 AUX_ROM Mode and uP Programming Flash
If
EAROM (CHPCON.5)
is set high, the AUX_RAM is programmed as AUX_ROM Mode that can be fetched
and executed like an internal ROM. It can be used as a self-programming ROM code source to program
external Flash Memory. In this mode, the following pins are directly controlled by its corresponding registers
to implement the flash programming function.
Pin Name
Register
Function
A7-A0
SFRFAL (C4h)
Flash low address
UP27-UP20
SFRFAH (C5h)
Flash high address
UP07-UP00
SFRFD (C6h)
Flash data
GPIO2/DAO/nFCE
UFCE (SFRCN.2)
Flash chip enable
PSEN
UFOE (SFRCN.1)
Flash output enable
GPIO1/nFWE
UFWE (SFRCN.0)
Flash write enable
Note 1:
The control bits in
SFRCN (C7h)
should be set the inverse value of its corresponding pins.
Note 2:
In the switch period from external flash memory to AUX_ROM, the Program Counter will be reset to
Zero, and uC will fetch and execute the ROM code from address 00H of AUX_ROM. Because the uP will
prefetch the ROM code before switch, for sake of the system operating smoothly, the instruction MOV
CHPCON,EAROM should will be followed by the instruction NOP to avoid the danger caused by compulsive
PC reset
.
2.3.4 Special Function Register (SFR)
The SFRs can be accessed only by direct addressing, while the on-chip RAM can be accessed by either direct or
indirect addressing. And the AUX_RAM is only accessed by MOVX instruction with selected external RAM
address range.
Address spaces 20H to 2FH to internal RAM are bit-addressable and can be used by the Boolean Variable
Manipulation instructions. For example, bit 0 of address 20H has a Boolean address 00H, and bit 7 of address
2FH has a Boolean address 7FH. The higher Boolean addresses (80H
FFH) are mapped into the SFR address
space. To determine a Boolean address in a particular bit-addressable SFR, one can combine the higher 5 bits
of the SFR address with 3 lower bits that specify the desired bit in the SFR.