English
Language : 

W79E217A Datasheet, PDF (80/207 Pages) Winbond – 8-bit Microcontroller
Preliminary W79E217A Data Sheet
8.1 Instruction Timing
This section is important because some applications use software instructions to generate timing
delays. It also provides more information about timing differences between the W79E217 and the
standard 8051/52.
In W79E217, each machine cycle is four clock periods long. Each clock period is called a state, and
each machine cycle consists of four states: C1, C2 C3 and C4, in order. Both clock edges are used for
internal timing, so the duty cycle of the clock should be as close to 50% as possible.
The W79E217 does one op-code fetch per machine cycle, so, in most instructions, the number of
machine cycles required is equal to the number of bytes in the instruction. There are 256 available op-
codes. 128 of them are single-cycle instructions, so many op-codes are executed in just four clock
periods. Some of the other op-codes are two-cycle instructions, and most of these have two-byte op-
codes. However, there are some instructions that have one-byte instructions yet take two cycles to
execute. One important example is the MOVX instruction.
In the standard 8051/52, the MOVX instruction is always two machine cycles long. However, in the
W79E217, the duration of this instruction is controlled by the software. It can vary from two to nine
machine cycles long, and, RD and WR strobe lines are elongated proportionally. This is called
stretching, and it gives a lot of flexibility when accessing fast and slow peripherals. It also reduces the
amount of external circuitry and software overhead.
The rest of the instructions are three-, four- or five-cycle instructions. At the end of this section, there
are timing diagrams that provide an example of each type of instruction (single-cycle, two-cycle, …).
In summary, there are five types of instructions in the W79E217, based on the number of machine
cycles, and each machine cycle is four clock periods long. The standard 8051/52 has only three types
of instructions, based on the number of machine cycles, but each machine cycle is twelve clock
periods long. As a result, even though the number of categories is higher, each instruction in the
W79E217 runs 1.5 to 3 times faster, based on the number of clock periods, than it does in the
standard 8051/52.
CLK
ALE
PSEN
AD7-0
PORT 2
Single Cycle
C1
C2
C3
C4
A7-0
Data_ in D7-0
Address A15-8
Figure 8-1: Single Cycle Instruction Timing
- 80 -
Publication Release Date: December 14, 2007
Revision A3.0