Oscillator frequency and code speed
One of important questions you ask when considering microcontroller project is wat oscillator frequency to choose. Usually it depend desired level of performance. In general application speed is directly determined by oscillator frequency. If you double the oscillator frequency, the application will rin in double speed.
But wee do not compare different processors by frequency, but by other quantity – MIPS (Million Instructions Per Second). Why it is so? Because different MCU require different clock cycles for performing one operation. For instance AVR microcontrollers require 1 (some 2) clock cycles for one instructions while Intel 8051 microcontrollers require a minimum of 12 oscillator cycles. So if Clock frequency is 12MHz then 8051 microcontroller will work at performance of 1 MIPS. AVR microcontroller which uses 12MHz crystal will work at about 12 MIPS.
But do we always need maximum performance? Many developers like to select maximum oscillator value that is supported by selected MCU. For instance if Atmega128 supports 16MHz frequency, then many people automatically choose values near to this value. Sometimes it is bad practice because:
-
Many applications do not require high level of performance that microcontrollers can provide;
-
In many CMOS based MCU there is almost linear relation between oscillator frequency and power consumption. Logically by reducing frequency you may reduce power requirements - this become important on battery driven applications;
-
When working in lower frequencies it is simpler to access low speed peripherals;
-
The higher clock frequency – the higher electromagnetic interference (EMI).
So you should operate at lowest oscillator frequency that is enough to your application.
Blogsphere: TechnoratiFeedsterBloglines
Bookmark: Del.icio.usSpurlFurlSimpyBlinkDigg
RSS feed for comments on this post | TrackBack URI for this post
New on WinAVR Tutorial
Running TX433 and RX433 RF modules with AVR microcontrollers,Sometimes in embedded design you may want to go wireless. Might be you will want to log various readi …Programming AVR ADC module with WinAVR,Most of AVR microcontrollers have Analog to Digital Converter (ADC) integrated in to chip. Such solut … |
New on WinARM Tutorial
What are differences between WinARM and WinAVR,Everyone who is working with AVR microcontrollers knows this powerful tool – WinAVR (http://win …LPC2000 watchdog timer,As in all microcontrollers watchdog timers purpose isto reset microcontroller after reasonable amount … |
