4
Delay Calculation Delay Calculation in 8051 in 8051

Delay

Embed Size (px)

Citation preview

Page 1: Delay

Delay Calculation in Delay Calculation in 80518051

Page 2: Delay

Machine cycle vs Clock cycleMachine cycle vs Clock cycle

The time between two adjacent pulses of The time between two adjacent pulses of the oscillator is the clock cyclethe oscillator is the clock cycle

Whereas 8051 requires 12 clocks (T-Whereas 8051 requires 12 clocks (T-states) to execute a single machine cycle. states) to execute a single machine cycle. So the clock cycle scaled down by 12 and So the clock cycle scaled down by 12 and hence hence machine cycle = clock cycle/12machine cycle = clock cycle/12

Page 3: Delay

Delay calculationDelay calculation

For 8051,For 8051, The clock frequency is 11.059MHzThe clock frequency is 11.059MHz The machine cycle frequency is The machine cycle frequency is

11.059MHz/12 = 921.6kHz.11.059MHz/12 = 921.6kHz. So machine cycle is So machine cycle is

• 1/921.6Khz = 1.085microseconds1/921.6Khz = 1.085microseconds• To get 1 sec delay, 1/1.085microseconds = To get 1 sec delay, 1/1.085microseconds =

921583 921583

Page 4: Delay