Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 7th April 2005, 06:03 AM   #1
Default Question about 8052.com FAQ

http://www.8052.com/faq.phtml?FAQ=14
Quote:
... 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?
Bluesbird is offline  
Old 7th April 2005, 07:01 AM   #2
Default

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.
bmcculla is offline  
Old 8th April 2005, 06:52 PM   #3
Default

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.
sarang1_in is offline  
Old 9th April 2005, 02:47 AM   #4
Default

Thanks, I had no idea about the clock/12 (prescaler?).
Bluesbird is offline  
Old 11th April 2005, 08:11 PM   #5
Default

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.
bmcculla is offline  
Reply

Tags
8052com, faq, question

Thread Tools
Display Modes




All times are GMT. The time now is 04:16 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker