Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Question about 8052.com FAQ

Status
Not open for further replies.

Bluesbird

New Member
**broken link removed**
... If you have a standard Intel 8052 running with a 12MHZ crystal, your timers will be incremented 1,000,000 times per second (1MHZ)...
Is it just me, or is this wrong? If not, would anybody care to explain for me why this is the case?
 
The timers are probably incremented once every machine cycle - 12clocks in the old 8051s. The 8051s I've used have a separate clock scaler for the timers.
 
The internal architecture of 8052 is such that the clock it use internally is the division of 12. So a 12 MHz crystal will produce a clock frequency of 1MHz. And by the formula of time as T = 1/F, F = frequency, it gives 1 microsecond as the minimum time to execute the single byte instruction for the same processor. After each clock pulse the timer increments by one. So 1 second = 1000msec = 1000000 microseconds. And so is that.
 
Its not really a prescaler. It actually takes 12 clocks to execute each 8051 instruction. If I remember correctly there are 6 steps to execute each instruction. Each takes 2 clocks. They origianaly did this to save transistors to make the 8051 cheap (a lot of the extra clocks don't do anything except make it easy to use external memory). Newer 8051s can execute instructions much faster: up to 1 clock per instruction using a pipeline.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top