4128F–8051–05/06
Reset Recomme nd ation
to Prevent Flash
Corruption
When a Flash program memory is embedded on-chip, it is strongly recommended to
use an external reset chip (brown out device) to apply a reset (Figure 7). It prevents sys-
tem malfunction d uring pe rio ds of insufficient power-supply vo ltage (power-supply
failure, power supply switched off, etc.).
Idle Mode Idle mode is a power reduction mode that reduces the power consumption. In this mode,
program exec ution halts. Idle mode freezes the clock to the CPU at known states while
the peripherals continue to be clocked. The CPU status before entering Idle mode is
pr eserved, i .e., the p rogram c ounter a nd pro gram stat us word regi ster retai n their data
for the duration of Idle mode. The contents of the SFRs and RAM are also retained. The
status of the Port pins during Idle mode is detailed in T able 12.
Ente ring Idle Mode To enter Idle mode, set the IDL bit in PCON register (See Table 15). The T89C5115
enters Idle mode upon execut ion of t he i nstruction that se ts IDL bit. The in struction that
sets IDL bit is the last instruction executed.
Note: If IDL bit and PD bit are set simultaneously, the T89C5115 enters Power-down mode.
Then it does not go in Idle mode when exiting Power-down mode.
Exi t ing Idle Mode T here are two ways to exit Idle mode:
1. Generate an enabl ed interrupt.
Hardware clears IDL bit in PCON register which restores the clock to the CPU. Exe-
cution resu mes with the interrupt service routine. U pon completion of the interrupt
service rou tine, p rogram execution res um es with t he i nstruction imm edia tely follow-
ing the instruction that activated Idle mode. The general purpose flags (GF1 and
GF0 in PCON regist er) may be u sed to ind icate whether an i nterrupt occurred dur-
ing norm al o peration or during Idle m ode . W hen I dle mode is exited by an interru pt,
the interrupt service routine may exam ine GF 1 and GF0.
2. Generate a reset.
A l ogic hi gh on the R ST pi n clears I DL bit i n PCO N regist er direc tly and asynch ro-
nously. This restores the clock to the CPU. Program execution momentarily
resumes with the instruction imme diately following the instruction th at ac tivated the
Idle mode and may continue for a number of clo ck cycles before the internal reset
algorithm takes control. Reset initializes the T89C5115 and vectors the CPU to
addres s C:0000h.
Notes: 1. During the time that execution resum es, the internal RAM cannot be accessed; how-
ever, it is possible for the Port pins to be accessed. To avoid unexpected outputs at
the Port pins, the instruction immediately following the instruction that activated Idle
mode should not write to a Port pin or to the external RAM.
2. If Id le mode i s invoked by ADC Idle, the ADC conversion compl etion will exi t Id le .
Power-d own Mode The Power-down mode places the T89C5115 in a very low power state. Power-down
mo de stops the oscillator, fre ezes all cloc k at known states. The CPU status prior t o
entering Power-down mode is preserved, i.e., the program counter, program status
word register retain their data for the duration of Power-down mode. In addition, the
SF Rs and RA M contents are preserv ed. T he s tatus of th e Port pins during Powe r-d own
mode is detailed in Table 14.
Entering Power-d own Mode To enter Power-down mode, set PD bit in PCON register. The T89C5115 enters the
Power-down mode upon execution of the instruction that sets PD bit . The instruction
that sets PD bit is the last instruction executed.