W77IE58
Publication Release Date: October 20, 2005
- 43 - Revision A5
Next Instruction
Machine Cycle
Third
Machine Cycle
Second
Machine Cycle
First
Machine Cycle
Last Cycle
of Previous
Instruction
C4
PORT 2
PORT 0
WR
PSEN
ALE
CLK
C3C2
D0-D7
A0-A7
D0-D7
A0-A7
D0-D7
A0-A7
D0-D7
A15-A8A15-A8A15-A8A15-A8
A0-A7
C1 C4C3C2C1 C4C3C2C1 C4C3C2C1
MOVX instruction cycle
Next Inst.
Read
Next Inst.
Address
MOVX Data out
MOVX Data
Address
MOVX Inst.
Address
MOVX Inst.
C4C3C2C1
Figure 9. Data Memory Write with Stretch Value = 1
Next
Instruction
Machine Cycle
Fourth
Machine Cycle
Third
Machine Cycle
Second
Machine Cycle
First
Machine Cycle
Last Cycle
of Previous
Instruction
C4
PORT 2
PORT 0
WR
PSEN
ALE
CLK
C3C2
D0-D7
A0-A7
D0-D7
A0-A7
D0-D7
A0-A7
D0-D7
A15-A8A15-A8A15-A8A15-A8
A0-A7
C1 C4C3C2C1 C4C3C2C1 C4C3C2C1
MOVX instruction cycle
Next Inst.
Read
Next Inst.
Address
MOVX Data out
MOVX Data
Address
MOVX Inst.
Address
MOVX Inst.
C4C3C2C1 C4C3C2C1
Figure 10. Data Memory Write with Stretch Value = 2
W77IE58
- 44 -
Wait State Control Signal
Either with the software using stretch value to change the required machine cycle of MOVX
instruction, the W77IE58 provides another hardware signal
WAIT to implement the wider duration of
external data access timing. This wait state control signal is the alternate function of P4.0 such that it
can only be invoked to 44-pin PLCC/QFP package type. The wait state control signal can be enabled
by setting WS (ROMMAP.7) bit. When enabled, the setting of stretch value decides the minimum
length of MOVX instruction cycle and the device will sample the
WAIT pin at each C3 state before
the rising edge of read/write strobe signal during MOVX instruction. Once this signal being
recongnized, one more machine cycle (wait state cycle) will be inserted into next cycle. The inserted
wait state cycles are unlimited, so the MOVX instruction cycle will end in which the wait state control
signal is deactivated. Using wait state control signal allows a dynamically access timimg to a selected
external peripheral. The WS bit is accessed by the Timed Access Protection procedure.
Set WS bit and stretch value = 0 to control wait signal.
7.3 Power Management
The W77IE58 has several features that help the user to control the power consumption of the device.
The power saving features are basically the POWER DOWN mode, ECONOMY mode and the IDLE
mode of operation.
Idle Mode
The user can put the device into idle mode by writing 1 to the bit PCON.0. The instruction that sets the
idle bit is the last instruction that will be executed before the device goes into Idle Mode. In the Idle
mode, the clock to the CPU is halted, but not to the Interrupt, Timer, Watchdog timer and Serial port
blocks. This forces the CPU state to be frozen; the Program counter, the Stack Pointer, the Program
Status Word, the Accumulator and the other registers hold their contents. The ALE and PSEN pins are
held high during the Idle state. The port pins hold the logical states they had at the time Idle was
activated. The Idle mode can be terminated in two ways. Since the interrupt controller is still active, the
activation of any enabled interrupt can wake up the processor. This will automatically clear the Idle bit,
terminate the Idle mode, and the Interrupt Service Routine(ISR) will be executed. After the ISR,
execution of the program will continue from the instruction which put the device into Idle mode.
The Idle mode can also be exited by activating the reset. The device can be put into reset either by
applying a high on the external RST pin, a Power on reset condition or a Watchdog timer reset. The
external reset pin has to be held high for at least two machine cycles i.e. 8 clock periods to be
recognized as a valid reset. In the reset condition the program counter is reset to 0000h and all the
SFRs are set to the reset condition. Since the clock is already running there is no delay and execution
starts immediately. In the Idle mode, the Watchdog timer continues to run, and if enabled, a time-out
will cause a watchdog timer interrupt which will wake up the device. The software must reset the
Watchdog timer in order to preempt the reset which will occur after 512 clock periods of the time-out.
When the W77IE58 is exiting from an Idle mode with a reset, the instruction following the one which
put the device into Idle mode is not executed. So there is no danger of unexpected writes.
W77IE58
Publication Release Date: October 20, 2005
- 45 - Revision A5
Economy Mode
The power consumption of microcontroller relates to operating frequency. The W77IE58 offers a
Economy mode to reduce the internal clock rate dynamically without external components. By default,
one machine cycle needs 4 clocks. In Economy mode, software can select 4, 64 or 1024 clocks per
machine cycle. It keeps the CPU operating at a acceptable speed but eliminates the power
consumption. In the Idle mode, the clock of the core logic is stopped, but all clocked peripherals such
as watchdog timer are still running at a rate of clock/4. In the Economy mode, all clocked peripherals
run at the same reduced clocks rate as in core logic. So the Economy mode may provide a lower
power consumption than idle mode.
Software invokes the Economy mode by setting the appropriate bits in the SFRs. Setting the bits
CD0(PMR.6), CD1(PMR.7) decides the instruction cycle rate as below:
CD1 CD0 Clocks/Machine cycle
0 0 Reserved
0 1 4 (default)
1 0 64
1 1 1024
The selection of instruction rate is going to take effect after a delay of one instruction cycle. Switching
to divide by 64 or 1024 mode must first go from divide by 4 mode. This means software can not switch
directly between clock/64 and clock/1024 mode. The CPU has to return clock/4 mode first, then go to
clock/64 or clock/1024 mode.
The W77IE58 allows the user to use internal RC oscillator instead of external crystal. Setting the
XT/
RG bit (EXIF.3) selects the crystal or RC oscillator as the clock source. When invoking RC
oscillator in Economy mode, software may set the XTOFF bit to turn off the crystal amplifier for saving
power. The CPU would run at the clock rate of approximately 24 MHz divided by 4, 64 or 1024. The
RC oscillator is not precise so that can not be invoked to the operation which needs the accurate time-
base such as serial communication. The RGMD(EXIF.2) indicates current clock source. When
switching the clock source, CPU needs one instruction cycle delay to take effect new setting. If crystal
amplifier is disabled and RC oscillator is present clock source, software must first clear the XTOFF bit
to turn on crystal amplifier before switch to crystal operation. Hardware will set the XTUP bit
(STATUS.4) once the crystal is warm-up and ready for use. It is unable to set XT/
RG bit to 1 if XTUP
= 0.
In Economy mode, the serial port can not receive/transmit data correctly because the baud rate is
changed. In some systems, the external interrupts may require the fastest process such that the
reducing of operating speed is restricted. In order to solve these dilemmas, the W77IE58 offers a
switchback feature which allows the CPU back to clock/4 mode immediately when triggered by serial
operation or external interrupts. The switchback feature is enabled by setting the SWB bit (PMR.5). A
serial port reception/transmission or qualified external interrupt which is enabled and acknowledged
without block conditions will cause CPU to return to divide by 4 mode. For the serial port reception, a
switchback is generated by a falling edge associated with start bit if the serial port reception is
enabled. When a serial port transmission, an instruction which writes a byte of data to serial port
buffer will cause a switchback to ensure the correct transmission. The switchback feature is
unaffected by serial port interrupt flags. After a switchback is generated, the software can manually
return the CPU to Economy mode. Note that the modification of clock control bits CD0 and CD1 will be
ignored during serial port transmit/receive when switchback is enabled. The Watchdog timer reset,
power-on/fail reset or external reset will force the CPU to return to divide by 4 mode.

W77I058A25PL

Mfr. #:
Manufacturer:
Description:
IC MCU 8BIT 32KB FLASH 44PLCC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet