TIME DELAY
FOR VARIOUS
8051 CHIPS
Delay
Calculation for
Other 8051
Two factors can affect the accuracy of
the delay
Crystal frequency
The duration of the clock period of the machine
cycle is a function of this crystal frequency
8051 design
The original machine cycle duration was set at
12 clocks
Advances in both IC technology and CPU
design in recent years have made the 1-clock
machine cycle a common feature
DS89C420/30/40/50 Dallas Semi 1
DS5000 Dallas Semi 4
P89C54X2 Philips 6
AT89C51 Atmel 12
Chip/Maker Clocks per Machine Cycle
Clocks per machine cycle for various 8051 versions
TIME DELAY
FOR VARIOUS
8051 CHIPS
Delay
Calculation for
Other 8051
(cont’)
Find the period of the machine cycle (MC) for various versions of
8051, if XTAL=11.0592 MHz.
(a) AT89C51 (b) P89C54X2 (c) DS5000 (d) DS89C4x0
Solution:
(a) 11.0592MHz/12 = 921.6kHz;
MC is 1/921.6kHz = 1.085μs = 1085ns
(b) 11.0592MHz/6 = 1.8432MHz;
MC is 1/1.8432MHz = 0.5425μs = 542ns
(c) 11.0592MHz/4 = 2.7648MHz ;
MC is 1/2.7648MHz = 0.36μs = 360ns
(d) 11.0592MHz/1 = 11.0592MHz;
MC is 1/11.0592MHz = 0.0904μs = 90ns
TIME DELAY
FOR VARIOUS
8051 CHIPS
Delay
Calculation for
Other 8051
(cont’)
For an AT8051 and DSC89C4x0 system of 11.0592 MHz, find how
long it takes to execute each instruction.
(a) MOV R3,#55 (b) DEC R3 (c) DJNZ R2 target
(d) LJMP (e) SJMP (f) NOP (g) MUL AB
Solution:
AT8051 DS89C4x0
(a) 11085ns = 1085ns 290ns = 180ns
(b) 11085ns = 1085ns 190ns = 90ns
(c) 21085ns = 2170ns 490ns = 360ns
(d) 21085ns = 2170ns 390ns = 270ns
(e) 21085ns = 2170ns 390ns = 270ns
(f) 11085ns = 1085ns 190ns = 90ns
(g) 41085ns = 4340ns 990ns = 810ns
NOP 1 1
SJMP 2 3
LJMP 2 3
4
2
1
1
8051
MUL AB 9
DJNZ R2 target 4
DEC R3 1
MOV R3,#55 2
Instruction DSC89C4x0
Home Automation, Networking, and Entertainment Lab
Chung-Ping Young
楊中平
I/O PORT
PROGRAMMING
The 8051 Microcontroller and Embedded
Systems: Using Assembly and C
Mazidi, Mazidi and McKinla
0 Comments