![](http://datasheet.mmic.net.cn/30000/M30245MC-XXXGP_datasheet_2358670/M30245MC-XXXGP_192.png)
M30245 Group
And Flash Control Circuit
Rev.2.00
Oct 16, 2006
page 190 of 264
REJ03B0005-0200
AND Flash Control Circuit
The AND flash control circuit is used for communicating with external AND type flash memory devices. The AND flash
control circuit can be used only in single-chip mode. This circuit cannot be emulated by ICE. The Port Control Register
(PCR), described by Figure 1.143, is used for overall control of this circuit. Setting bit AFPE to '1' assigns port pins
P00-P07 and P10-P12 to function as signals necessary to interface with external flash memory. Along with their basic
function, these activated signals are listed in Table 1.66, and described as follows:
AND_DATA(7:0) - These signals comprise the bus for input/output communication of data between the CPU
and external flash memory. Upon circuit activation, the port P0 pins function as these signals. The port P0
direction register must be used to setup the direction of the AND_DATA(7:0) bus for input/output operation.
AND_OE - This signal is assigned to pin P12. Setting bit OECTRL to '1' will output a "L" pulse on this signal
during each read from flash memory. When OECTRL is '0', AND_OE remains set "L".
AND_WE - This signal is assigned to pin P11. Setting bit WECTRL to '1' will output a "L" pulse on this signal
during each write to flash memory. When WECTRL is '0', AND_WE remains set "H".
AND_SC - This signal is assigned to pin P10. With OECTRL set to '1' and WECTRL set to '0', a "H" pulse will be
output on this signal during each flash memory write. If OECTRL is set to '0' and WECTRL set to '1', every read
from flash memory will cause a "H" pulse to be output. The condition whereby both OECTRL and WECTRL are
set to '1' results in AND_SC remaining set "L".
Figure 1.132 in the Programmable I/O section shows how the AND flash control circuitry is integrated with the port
control logic for pins P00-P07 and P10-P12.
When reset
00
16
Bit Symbol
Bit Name
Function
R W
PCR0
Port P1 control register
Symbol
PCR
Address
03FF
16
Port control register
b7
b5
b6
b4
b3
b2
b1
b0
O O
_
0 : When input port, read port input
level. When output port, read the
contents of Port P1 register.
1 : Read the contents of Port P1
register through input/output port.
Nothing is assigned.
Write "0" when writing to this bit. The value is"0" when read.
OECTRL
WECTRL
AFPE
AND Flash OE control bit
AND Flash WE control bit
AND Flash port enable bit
0 : Data read mode enabled
1 : Output disabled
0 : Input disabled
1 : Command/Address mode enabled
0 : P0 & P1(0-2) GPI/O function
1 : P0 & P1(0-2) AND Flash control
function
O O
Figure 1.143. Port control register