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
 
LinkBack Thread Tools Display Modes
Old 15th January 2008, 06:44 PM   (permalink)
Default Operating speed of micro controller?

I know this is a dumb question but I'm trying to educate myself all I can about micro controllers via the web. There are a lot of great resources out there but nevertheless I do have a question. When a micro controller such as a PIC16F876 says that it's got an operating speed of 20 MHz clock input, what exactly does that mean? Can it execute 20,000,000 clock cycles per second? Does it mean that it is capable of keeping track of time in increments as small as 50 nanoseconds? Also, does that mean that you need to use a 20MHz crystal across pins OSC1 and OSC2? Reading a lot online but you guys are a bank of knowledge here as well.
Thanks again!
bigfarmerdave is offline  
Old 15th January 2008, 07:52 PM   (permalink)
Default

Quote:
Originally Posted by bigfarmerdave
I know this is a dumb question but I'm trying to educate myself all I can about micro controllers via the web. There are a lot of great resources out there but nevertheless I do have a question. When a micro controller such as a PIC16F876 says that it's got an operating speed of 20 MHz clock input, what exactly does that mean? Can it execute 20,000,000 clock cycles per second? Does it mean that it is capable of keeping track of time in increments as small as 50 nanoseconds? Also, does that mean that you need to use a 20MHz crystal across pins OSC1 and OSC2? Reading a lot online but you guys are a bank of knowledge here as well.
Thanks again!
It means it uses a maximum clock frequency of 20MHz, but internally this is divided by four - giving 200nS per instruction cycle.

And yes, this means it uses a 20MHz crystal.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 16th January 2008, 04:18 AM   (permalink)
Default

To get a true speed of the micro controller you must get familiar with that particular class and chip. Microchip devices generally have an instruction cycle at 1/4 the clocking speed. Yet there are some with internal multipliers which grant the instruction cycle to be equal to the clock.

MIPS, millions of instructions per second is the industry standard benchmark for measuring instruction speed. 10 MIPS for one company is 10 MIPS for another company if so stated and is 10 MIPS regardless of the clock speed. Some companies have a genuine 1:1 instruction to clock ratio, some 1:2, and 1:4. But if theirs is 10 MIPS it will be the same to any other 10 MIPS world wide.

But don't let MIPS full you. Its just an instruction cycle and not an accurate performance comparison. You have to account for that many instructions are not the same speed, some 1 cycle, 2, 4, or 6. Some chips may be slower yet have an internal math co processor which is capable of performing 32 bit math in a single cycle or two. While the fast chips either have only none to 16 bit math that will take a lot of time to perform 32 bit computations. Some chips have large communication buffers allowing main line code to consume better processing time as supposed to a small communication buffer needing constant interruption of main line code. Some chips have such a large instruction set that one of its single instructions is capable of accomplishing a task in one cycle that a smaller instruction set chip does in 5 to 10.

Last edited by donniedj; 16th January 2008 at 04:24 AM.
donniedj is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
speed controller koh Micro Controllers 0 17th May 2007 11:36 AM
i need a micro controller for signal processing kasser Micro Controllers 15 4th March 2007 09:23 AM
PC---> Micro Controller ---> Devices HELP firekiller51 Micro Controllers 1 25th October 2006 07:19 PM
Government Ignores Police Concerns In Changing Speed Limit Rules ThermalRunaway Chit-Chat 5 20th August 2006 03:35 AM
Micro Controller Switcher Help Fuad General Electronics Chat 3 25th May 2003 08:48 AM



All times are GMT. The time now is 01:59 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker