Variable Length MOVX Instruction (Stretch Memory Cycle)
The DS80C320 is capable of performing a MOVX instruction in as little as 2 instruction cycles (8 oscillator cycles). However, it is not always desirable to have memory access work at maximum speed. If you are using slow RAM, you may wish to have memory access work much slower. Additionally, it is common for external devices (such as LCDs) to be connected to the 80C320 as a "memory port." These devices operate much slower than normal memory and, thus, it may be necessary to slow down memory access to give these devices time to work with the data.
The length of the MOVX instruction is controlled by bits 0, 1, and 2 in the new SFR
CKCON (8Eh). The MOVX instruction will require 2 instruction cycles, PLUS the number of instruction cycles indicated in bits 0, 1, and 2 of CKCON. That is to say, if bits 0 through 2 contain the value 5, the MOVX instruction will require 2 + 5 = 7 instruction cycles to execute.
When the 80C320 is first powered up, bits 0, 1, and 2 of CKCON default to the value "1". This means that, by default, a MOVX instruction requires 3 instruction cycles. However, your program may modify this SFR to reduce the instruction to 2 cycles by setting it to 0, or to as many as 9 cycles by increasing it to 7.
Click
here for
>>>>
Dallas
80C320 -
Chapter
1.3 (Timer
Consideration) |