• Reduce EMI Mode (I nhibi t ALE t hro ugh AUXR SFR )
• SPI Serial Interface
• TTL- and CMOS-Compatible Logic Levels
• Brown-out Detection
• Extended Power-Saving Modes
– Idle Mode
– Power Down Mode with External Interrupt Wake-up
– Standby (Stop Clock) Mode
• PDIP-40, PLCC-44 and TQFP-44 Packages
• Temperature Ranges:
– Commercial (0°C to +70°C)
– Industrial (-40°C to +85°C)
PRODUCT DESCRIPTION
SST89E564, SST89V564, SST89E554, and SST89V554
are members of the FlashF le x51 f amily of 8-bit microcontr ollers. The FlashFlex51 is a family of microcontroller products
designed and m anufactured on the state-of-t he-art SuperFlash CMOS semiconductor process technology. The
device uses th e same powerful instruction se t and is pin-forpin compatible with standard 8xC5x microcontroller devices.
The device comes with 72/40 KByte of on-chip flash
EEPROM program memory using SST’s patented and proprietar y CMO S Super Flash E EPROM tech nolo gy with the
SST’s field-enhancing, tunneling injector, split-gate memory cells. The SuperFlash memory is partitioned into 2
independent program memory blocks. The primary SuperFlash Block 0 occupies 64 /32 KByte of internal program
memory space and the secondary SuperFlash Block 1
occupies 8 KByte of i nt ernal program mem ory space. The
8-KByte second ary SuperFlash block ca n be mapped to
the lowest location of the 64/32 KByte address space; it
can also be hidden from the program counter and used as
an independent EEPROM-like data memory. The flash
memory blocks can be programmed via a standard 87C5x
OTP EPR OM prog ramm er fitted with a specia l adapter and
firmware for SST’s device. During the power-on reset, the
device can be configured as a slave to an external host for
source code storage or as a master to an external host for
In-Application Programming (IAP) o perati on. T he device is
designed to be p rogrammed “In-System ” and “In-Applic ation” on the printed circuit board for maximum flexibility. The
device is pre-programmed with an example of bootstrap
loader in the memo ry, demonstrating the initial user program code loading or su bsequent user c ode updating v ia
the “IAP” operatio n. An example of bootstrap loader is for
the user’s reference and convenience only. SST does not
guarantee the functionality or the usefulness of the sample
bootstrap loader. Chip-Erase or Block-Erase operations will
erase the pr e-pro gra mmed sa mple code .
In addition to 72/ 40 KByte of SuperFlash EEPROM program memory on-chip, the device can address up to 64
KByte of external prog r a m memo ry. In additio n t o 10 24 x 8
bits of on-chip RAM, up to 64 KBy te of exter nal RAM ca n
be addressed.
SST’s highly reliable, patented SuperFlash technology and
memory cell architecture have a number of important
advantages for designing and manufacturing flash
EEPROMs. These advantages translate into significant
cost and reliability benefits for our customers.
sink seve ral LS TTL inputs. Port 0 pins float that have “1”s written to them, and in this state
can be used as high-impedance inputs. Port 0 is also the multiplexed low-order address and
data bus during accesses to external memory. In this application, it uses strong internal pullups when transitioning to V
. Port 0 also receives the code bytes during the external host
OH
mode programming, and outputs the code bytes during the external host mode verification.
External pull-u ps are required during program verification.
Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The P ort 1 output buffers
can drive LS TTL inputs. Port 1 pins are pulled high by the internal pull-ups when “1”s are
written to them and can be used as inputs in this state. As inputs, Port 1 pins that are externally pulled lo w will source cu rren t (I
, see Tables 10-3 and 10-4 ) beca use of t he inte rnal pull-
IL
ups. P1[5, 6, 7] have high current drive of 16 mA. Port 1 also receives the low-order address
bytes during the external host mode p rogramming and verification.
Port 2: Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. Port 2 pins are pulled
high by the internal pull-ups when “1”s are written to them and can be used as inputs in this
state. As inputs, Port 2 pins that are externally pulled low will source current (I
, see Tables
IL
10-3 and 10-4) because of the internal pull-ups. Port 2 sends the high-order address byte
during fetches from exte rnal Program memory and during acce sses to e xternal Data Mem ory
that use 16-bit address (MOVX@DPTR). In this application, it uses strong internal pull-ups
when transitioning to V
. Port 2 also receives some control signals and a partial of high-
OH
order address bits during the external host mode programming and verification.
Port 3: Port 3 is an 8-bit bidirection al I / O po rt with internal pul l-u ps. The Port 3 output buff e rs
can drive LS TTL inputs. Port 3 pins are pulled high by the internal pull-ups when “1”s are
written to them and can be used as inputs in this state. As inputs, Port 3 pins that are externally pulled lo w will source cu rren t (I
, see Tables 10-3 and 10-4 ) beca use of t he inte rnal pull-
IL
ups. P ort 3 also receives some control signals and a partial of high-order addre ss bits during
the external host mode programming and verification.
device is executing from Internal Program Memory, PSEN# is inactive (V
). When the
OH
device is executing code from External Program Memory, PSEN# is activated twice each
machine cycle, ex ce pt whe n acce ss to Exte rnal Data Memory while one PSEN# activation is
skipped in each machine cycle. A forced high-to-low input transition on the PSEN# pin while
the RST input is conti n ual ly hel d hi gh for more than ten machine cycles will ca us e the device
to enter External Host mode for programming.
SymbolType
P0[7:0]I/OPort 0: Port 0 is an 8-bit open drain bi-directional I/O port. As an output port each pin can
P1[7:0]I/O with internal
P1[0]I/OT2: External count input to Timer/Counter 2 or Clock-out from Timer/Counter 2
P1[1]IT2EX: Timer/Counter 2 capture/reload trigger and direction control
P1[4]I/OSS#: Master Input or Slave Output for SPI
P1[5]I/OMOSI: Master Output line, Slave Input line for SPI
P1[6]I/OMISO: Master Input line, Slave Output line for SPI
P1[7]I/OSCK: Master clock output, slave clock input line for SPI
P2[7:0]I/O with internal
P3[7:0]I/O with internal
P3[0]IRXD: Serial input line
P3[1]OTXD: Serial output lin e
P3[2]IINT0#: External Interrupt 0 Input
P3[3]IINT1#: External Interrupt 1 Input
P3[4]IT0: External count input to Timer/Counter 0
P3[5]IT1: External count input to Timer/Counter 1
P3[6]OWR#: External Data Memory Write strobe
P3[7]ORD#: External Data Memory Read strobe
PSEN#I/OProgram Store Enable: PSEN# is the Read strobe to External Program Store. When the
RSTIReset: Whil e the oscill ator is running, a hi gh logic sta te on this pin for tw o machi ne cycles will
EA#IExternal Access Enable : EA# must be driven to V
ALE/PROG#I/OAddress Latch Enable: ALE is the output signal for latching the low byte of the address dur-
XTAL1
XTAL2
V
DD
VssIGround: Circuit ground. (0V reference)
1. I = Input; O = Output
2. It is not necessary to receive a 12V programming supply voltage during flash programming.
1
Name and Functions
reset the device. After a reset, if the PSEN# pin is driven by a high-to-low input transition
while the RST input pin is held high, the device will enter the External Host mode, otherwise
the device will enter the Normal operation mode.
in order to enable the device to fetch
code from the External Program Memory. EA# must be driven to V
IL
for internal program exe-
IH
cution. However, Security lock level 4 will disable EA#, and program execution is only possible from internal program memory. The EA# pin can tolerate a high voltage
2
of 12V
(see “Absolute Maximum Stress Ratings” on page 47).
ing acces s es to external memory. This pin is also the programming pulse input (PROG#) for
the external host mode. ALE is activated twice each machine cycle, except when access to
External Data Memory, one ALE activation is skipped in th e seco nd mac hine cy cle . Ho wever,
if AO is set to 1, ALE is disabled. (see “Auxiliary Register (AUXR)” on page 20)
I
O
Oscillator: Input and output to the inverting oscillator amplifier. XTAL1 is input to internal
clock generation circuits from an external clock source.
IPower Supp ly: Supply voltage during normal, Idle, Power Down, and Standby Mode opera-
The device has separate addr e ss s pa ce s for program an d
data memory.
3.1 Program Memory
There are two internal flash memor y blocks in the device.
The primary flash memory block (Block 0) has 64/32
KByte. The secondary flash memory block (Block 1) has 8
KByte. Since the total program address space is limited to
64/32 KByte, the SFCF[1:0] bit are used to control Program
FFFFH
EA# = 0
FFFFH
SFCF[1:0] = 00
Bank Selectio n. Please re fer to Figure 3-1 and F igure 3-2
for the program memory configurations. Program Bank
Select is described in the next section.
The 64K/32K x8 primary SuperFlash block is organized as
512/256 sectors, each sector consists of 128 Bytes.
The 8K x8 secondary SuperFlash block is organized as 64
sectors, each sector consists also of 128 Bytes.
For both blocks, the 7 least significant program address bits
select the byte within the sector. The remainder of the program addr ess bi ts selec t the sect or with in the bloc k.
EA# = 1
EA# = 1
SFCF[1:0] = 01, 10, 11
FFFFH
56 KByte
Block 0
0000H
FIGURE3-1: P
External
64 KByte
64 KByte
Block 0
2000H
1FFFH
8 KByte
Block 1
0000H
ROGRAM MEMORY ORGANIZATIONFOR SST89E564 AND SST89V564
FIGURE3-2: PROGRAM MEMORY ORGANIZATIONFOR SST89E554 AND SST89V 554
3.2 Program Memory Block Switching
The prog r am mem ory block switching feature of the device
allows either Block 1 or the lowest 8 KByte of Block 0 to be
used for the lowest 8 KByte of the program address space.
SFCF[1:0] controls program memory block switching.
TABLE3-1: SFCF VALUESFOR PROGRAM MEMORY BLOCK SWITCHINGFOR SST89E564/SST89V 564
SFCF[1:0]Program Memory Block Switching
01, 10, 11Block 1 is not visible to the PC;
Block 1 is reachable only via In-Application Programming from 000H - 1FFFH.
00Block 1 is overlaid onto the low 8K of the program address space; occupying address locations 0000H - 1FFFH.
When the PC falls within 0000H - 1FFFH, the instruction will be fetched from Block 1 instead of Block 0.
Outside of 0000H - 1FFFH, Block 0 is used. Locations 0000H - 1FFFH of Block 0 are reachable through
In-Application Programming.
Block 1 is reachable only via In-Application Programming from E000H - FFFFH.
01Both Block 0 and Block 1 are visible to the PC.
Block 0 is occupied from 0000H - 7FFFH. Block 1 is occupied from E000H - FFFFH.
00Block 1 is overlaid onto the low 8K of the program address space; occupying address locations 0000H - 1FFFH.
When the PC falls within 0000H - 1FFFH, the instruction will be fetched from Block 1 instead of Block 0.
Outside of 0000H - 1FFFH, Block 0 is used. Locations 0000H - 1FFFH of Block 0 are reachable through
In-Application Programming.
3.2.1 Reset Configuration of Program Memory
Block Switching
Program memory block switching is initialized after reset
according to the state of the Start-up Configuration bit SC0.
The SC0 bit is programmed via an External Host Mode
command or an IAP Mode command. Se e Table 4-2 and
Table 4-6.
Once out of reset, the SFCF[0] bit can be changed dynamically by the progr am f or desir ed eff ects . Changing SFCF[0]
will not change the SC0 bit.
Caution must be taken when dynamically changing the
SFCF[0] bit. Since this will cause different physical memory
to be mapped to t he logical program address s pace. The
user must avoid executing block switching instructions
within the address range 0000H to 1FFFH.
ALUESFOR PROGRAM MEMORY BLOCK SWITCHINGFOR SS T8 9E554/S ST89V 554
3.3 D ata Memory
The device has 1024 x 8 bits of on-chip RAM and can
address up to 64 KByte of external data memory .
The device has f our sect ions of internal dat a memory:
1. The lower 128 Bytes of RAM (00H to 7FH) are
directly and indirectly addressable.
2. The higher 128 Bytes of RAM (80H to FFH) are
indirectly addressable.
3. The Special Function Registers (SFRs, 80H to
FFH) are directly addressable only.
4. The expanded RAM of 768 Bytes (00H to 2FFH) is
indirectly addressable by the move external
instruction (MOVX) and clearing the EXTRAM bit.
(See “Auxiliary Register (AUXR)” on page 20)
T3-2.2 384
TABLE3-3: SFCF VALUES UNDER DIFFERENT
ESET CONDITIONS
R
State of SFCF[1:0] after:
WDT
Power-on
or
1
SC1
SC0
11 00
10 01x111
01101010
00111111
1. SC1 only applies to SST89E554 and SST89V554.
External
Reset
(default)
Reset
or
Brown-out
Reset
x010
Software
Reset
T3-3.2 384
3.4 Dual Data Pointers
The device has two 16-bit data pointers. The DPTR Select
(DPS) bit in AUXR1 determines which of the two data
pointers is accessed. When DPS=0, DPTR0 is selected;
when DPS=1, DPTR1 is selected. Quickly switching
between the two data pointers can be accomplished by a
single INC instruction on AUXR1.
3.5 Special Function Registers (SFR)
Most of the unique features of the Flash Flex51 microcontroller family are contr o ll ed by bits in s pecial function r eg isters (SFRs) located in the SFR Memory Map shown in
Table 3-4. Individual descriptions of each SFR are provided
and Reset values indicated in T ables 3-5 to 3-9.
000_1110bByte-Program
000_1111bProg-SB1
000_0011bProg-SB2
000_0101bProg-SB3
000_1001bProg-SC0
All other combinations are not implemented, and reserved for future use.
1. Byte-Verify has a single machine cycle latency and will not generate any INT1# interrupt regardless of FIE.