Instruction timing, Single-byte instructions, Instruction timing -5 – Maxim Integrated Ultra-High-Speed Flash Microcontroller User Manual
Page 52: Single-byte instructions -5

5-5
Instruction Timing
The ultra-high-speed microcontroller executes the industry standard 8051 instruction set. Each instruction requires a minimum of one
memory cycle of execution time, and may require as many as ten memory cycles (DIV AB only). The number of memory cycles required
to execute any given 8051 instruction is documented at the end of this section and can be found in Section 14 (Instruction Set Details).
A memory cycle is the basic timing unit for the ultra-high-speed microcontroller. If internal program code is being executed, a memo-
ry cycle always consists of one system clock. If external program code is being executed, a memory cycle is then composed of 1, 2,
or 4 system clocks, as defined by the external bus configuration (non page mode, page mode 1, or page mode 2).
Calculating the number of external crystal or oscillator clock periods (t
CLCL
) per memory cycle additionally depends upon how the
user has configured the system clock as a function of the external clock. The system clock control function was covered earlier in the
section. As an example, if the crystal multiplier is used to generate a system clock frequency four times the frequency of the external
clock source, a nonpaged mode external memory cycle would consist of one external clock.
All instructions are coded within an 8-bit field called an op code. This single byte must be fetched from program memory. The CPU
decodes the op code to determine what action the microcontroller must take or whether additional information is needed from memo-
ry. If no other memory is needed, then only 1 byte was required. Thus, the instruction is called a 1-byte instruction. In some cases,
more data is needed. These are 2- or 3-byte instructions.
Single-Byte Instructions
A single-byte instruction can require anywhere between one and ten memory cycles to execute. When the execution cycle count
exceeds the byte count, the program counter must stall until instruction execution is completed. All MOVX data memory access instruc-
tions have a single-byte op code, but require more memory cycles so that data may be accessed. The MOVX instruction timing is cov-
ered in Section 6 (Memory Access). Following are examples of single byte instructions, each requiring a different number of execution
cycles:
OPCODE
NO. OF CYCLES
RRC A
13h
1
DA A
D4h
2
RET
22h
3
MUL AB
A4h
9
DIV AB
84h
10
SYSTEM
CLOCK
MEMORY
CYCLE
MUX
EXECUTION
INTERNAL
EXTERNAL
NON PAGE
PAGE MODE 1 (1-CYCLE)
PAGE MODE 1 (2-CYCLE)
PAGE MODE 1 (3-CYCLE)
PAGE MODE 2
MEMORY CYCLE
SYSCLK/1
SYSCLK/4
SYSCLK/1
SYSCLK/2
SYSCLK/4
SYSCLK/2 (PROG)
SYSCLK/4 (DATA)
00
01, 10
11
Figure 5-4. Instruction Memory Cycle Determination
Ultra-High-Speed Flash
Microcontroller User’s Guide
Maxim Integrated