This article mainly introduces the characteristics of atmega48 microcontroller, puts forward the general method of its low power design, and takes the design of timing control system as an example to specifically explain the low power design scheme of atmega48.
With the development of microelectronics and computer technology, especially the widespread application of microcomputers in various fields, indicators such as power consumption, cost, volume and reliability have become important issues that designers are concerned about. Especially in battery-powered devices, how to reduce device power consumption has become the primary design task. This article takes the atmega48 microcontroller of Atmel as an example to introduce the general method of low-power design of microcontrollers.
atmega48单片机低功耗系统设计首要是选择合适的单片机。atmega48单片机是一款8位微控制器,具有高性能、低功耗的显著特点。由于采用risc精简指令集结构,其指令集大多为单周期指令,具有高速运行的特点。3v供电时,未使能内部看门狗的情况下,atmega48的典型掉电电流小于1ua。具体工作电流见图1。而且该单片机在1.8v~5.5v的电压范围内均能正常工作,片内自带4k字节的flash、256字节的e2prom,以及512字节sram;并内置6~8路10位ad转换器、看门狗、3个16位的定时/计数器、具有独立振荡器的实时计数器rtc 和6路PWM输出。另外还具有五种休眠模式,引脚变化及中断可唤醒mcu。
Fig.1 Relationship between working current and system frequencyFig.2 Relationship between working current and supply voltage (128k)
Low power design method
The total energy consumption of a system with a single-chip microcomputer as the core is composed of the energy consumption of the single-chip microcomputer and its peripheral circuits. In order to reduce the power consumption of the entire system, in addition to reducing the operating power consumption of the single-chip microcomputer itself, the power consumption of the peripheral circuits must also be reduced. For peripheral circuits, first choose low-voltage and low-power devices, such as using lmv324 instead of the traditional lm324, sp3223eey instead of max232, etc. Secondly, the input pins of CMOS devices cannot be left floating. If the input pins are left floating, it is easy to accumulate charge on the input pins, generate a large induced electromotive force, and make the pin potential in the transition area between 0 and 1. In addition, resistive components should be avoided as much as possible in the peripheral circuits of single-chip microcomputers.
The power consumption of atmega48 microcontroller is mainly related to the system frequency, working mode, power supply voltage and peripheral modules. As shown in Figure 1 and Figure 2, the working current of atmega48 microcontroller is proportional to its working frequency and working voltage.
Reduce system clock frequency
Power consumption is related to the operating frequency. When the operating frequency increases, the power consumption also increases linearly. When the system operating frequency decreases, the circuit delay increases, resulting in a decrease in system performance. Therefore, when using frequency to reduce system power consumption, a trade-off must be made between energy consumption and speed.
The clock source of atmega48 can be selected from the internal RC oscillator or from an external clock. The internal RC oscillator provides a calibrated 8M clock and a 128K low-power oscillator. The external clock can be a low-power crystal, a full-amplitude crystal, and a low-frequency crystal. The desired clock source can be selected by programming the flash fuse bit.
Atmega48 can get the divided system clock by setting the clock pre-scaling register clkpr. This feature can be used to reduce power consumption when the required system processing power is relatively low. Pre-scaling applies to all clock sources and affects the clock frequency of the CPU and all synchronous peripherals.
The clock system of the microcontroller mainly includes: CPU clock, flash clock, I/O clock, asynchronous timer clock and ADC clock. In most cases, these clocks do not need to work at the same time. The clock power suppression register PRR provides a method to terminate the clock of individual peripherals to reduce power consumption. By setting the power suppression register PRR, unused peripheral modules can be turned off to reduce chip power consumption. For example, if the ADC module is not used, "1" can be written to the pradc bit in the power suppression register PRR to turn off the ADC module of the chip. At the same time, in order to reduce power consumption, different sleep modes can be used to disable modules that do not need to work.
Previous article:Why choose AVR? What are the advantages of AVR?
Next article:Design of fully automatic solar energy water heater controller based on AVR single chip microcomputer
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【RPi PICO】CircuitPython driver ws2812
- dspIC30f6010a chip CAN communication and data processing
- 【McQueen Trial】McQueen product information
- Solving High-Voltage Current Sensing Design Challenges in HEV/EV
- Has anyone made irregular PCB? Please help
- Car Charger IC
- Several points to note when using SIMD to process multiple data in parallel
- Free evaluation - Topmicro intelligent display module (2) displays a picture
- The resistance of the transistor
- AD18 PCB package drawing does not display when imported