What is an AVR microcontroller? What are the advantages of an AVR microcontroller? Why should you choose an AVR microcontroller?
AVR microcontroller is a new type of microcontroller developed by ATMEL. Compared with 51 microcontroller and PIC microcontroller, it has a series of advantages:
1: AVR runs fastest under the same system clock;
2: The capacity of Flsah, EEPROM and SRAM inside the chip is large;
3: All models of Flash and EEPROM can be repeatedly burned and written, and all support online programming (ISP);
4: Internal RC oscillator with multiple frequencies, automatic reset on power-on, watchdog, start-up delay and other functions, and zero peripheral circuit can also work;
5: Each IO port can output high and low levels in a push-switch drive mode, with strong driving capability;
6: Rich internal resources, generally integrated AD, DA analog-to-digital devices; PWM; SPI, USART, TWI, I2C communication ports; rich interrupt sources, etc.
Currently, the languages that support AVR microcontroller compilers mainly include assembly language, C language, BASIC language, etc. Among them, C compilers mainly include CodeVisionAVR, AVRGCC, IAR, ICCAVR, etc. The C language compiler has an irreplaceable position in professional program design due to its inherent advantages such as powerful functions, flexible application, small code, and fast running speed.
AVR microcontroller is an enhanced RISC (Reduced Instruction Set CPU) high-speed 8-bit microcontroller with built-in Flash developed by ATMEL in 1997. AVR microcontrollers can be widely used in various fields such as computer peripherals, industrial real-time control, instrumentation, communication equipment, and household appliances.
Main features of AVR
High reliability, powerful functions, high speed, low power consumption and low price have always been important indicators for measuring the performance of microcontrollers, and are also necessary conditions for microcontrollers to occupy the market and survive.
The early single-chip microcomputers adopted a safe solution mainly due to the low level of technology and design, high power consumption and poor anti-interference performance: using a higher frequency division coefficient to divide the clock, which makes the instruction cycle long and the execution speed slow. Although the later CMOS single-chip microcomputers adopted measures such as increasing the clock frequency and reducing the frequency division coefficient, this situation has not been completely changed (51 and 51 compatible). Although some reduced instruction set microcontrollers (RISC) have been introduced, they still follow the practice of clock division.
The introduction of AVR microcontrollers completely broke this old design pattern, abolished the machine cycle, abandoned the practice of complex instruction computers (CISC) to pursue complete instructions; adopted a reduced instruction set, using words as the unit of instruction length, and arranged rich operands and operation codes in one word (most of the single-cycle instructions in the instruction set are like this), with a short instruction fetch cycle, and can pre-fetch instructions to achieve pipeline operation, so instructions can be executed at high speed. Of course, this speed jump is backed by high reliability.
The hardware structure of AVR microcontroller adopts a compromise strategy between 8-bit and 16-bit machines, that is, a local register storage stack (32 register files) and a single high-speed input/output solution (i.e., input capture register, output comparison match register and corresponding control logic). It improves the instruction execution speed (1Mips/MHz), overcomes the bottleneck phenomenon, and enhances the function; at the same time, it reduces the cost of peripheral management, relatively simplifies the hardware structure, and reduces the cost. Therefore, AVR microcontroller has achieved an optimized balance in software/hardware cost, speed, performance and cost, and is a cost-effective microcontroller.
AVR microcontrollers have built-in high-quality Flash program memory, which is easy to erase and write, supports ISP and IAP, and is convenient for product debugging, development, production, and updating. The built-in long-life EEPROM can store key data for a long time to avoid power loss. The large-capacity RAM on the chip can not only meet the use of general occasions, but also more effectively support the use of high-level languages to develop system programs, and can expand external RAM like the MCS-51 microcontroller.
All I/O lines of AVR microcontrollers have configurable pull-up resistors, can be individually set as input/output, can be set as (initial) high-impedance input, and have strong driving capabilities (power driver devices can be omitted), making the I/O port resources flexible, powerful, and fully utilized.
AVR microcontrollers have multiple independent clock dividers for URAT, I2C, and SPI. Among them, the pre-divider with up to 10 bits in combination with the 8/16-bit timer can provide various levels of timing by setting the frequency division coefficient through software. The unique design method of AVR microcontrollers, "using timer/counter (single) bidirectional counting to form a triangular wave, and then coordinating with the output comparison matching register to generate a variable duty cycle, variable frequency, and variable phase square wave (i.e. pulse width modulation output PWM)", is even more refreshing.
The enhanced high-speed synchronous/asynchronous serial port has the functions of hardware-generated check code, hardware detection and check error detection, two-level receiving buffer, automatic baud rate adjustment and positioning (when receiving), and data frame shielding, which improves the reliability of communication, facilitates program writing, and is more convenient for forming distributed networks and realizing complex applications of multi-machine communication systems. The serial port function greatly exceeds the serial port of MCS-51/96 microcontrollers. In addition, the AVR microcontroller is high-speed and the interrupt service time is short, so high baud rate communication can be achieved.
Byte-oriented high-speed hardware serial interface TWI, SPI. TWI is compatible with I2C interface, and has functions such as ACK signal hardware transmission and recognition, address recognition, bus arbitration, etc., and can realize multi-machine communication of all 4 combinations of master/slave receiving/transmitting. SPI supports multi-machine communication of 4 combinations such as master/slave.
The AVR microcontroller has an automatic power-on reset circuit, an independent watchdog circuit, a low voltage detection circuit BOD, multiple reset sources (automatic power-on and power-off reset, external reset, watchdog reset, BOD reset), and a programmable delay after startup, which enhances the reliability of the embedded system.
AVR microcontrollers have multiple power-saving sleep modes, and can operate in a wide voltage range (5-2.7V). They have strong anti-interference capabilities, which can reduce the workload of software anti-interference design and the amount of hardware used in general 8-bit machines. AVR microcontroller technology embodies the integration of multiple devices (including FLASH program memory, watchdog, EEPROM, synchronous/asynchronous serial port, TWI, SPI, A/D analog-to-digital converter, timer/counter, etc.) and multiple functions (reset system to enhance reliability, sleep mode to reduce power consumption and anti-interference, interrupt system with a wide variety of categories, timer/counter with diversified functions such as input capture and compare match output, I/O port with replacement function...), which fully reflects the development direction of microcontroller technology from "self-operating" to "system on chip SoC".
To sum up, the AVR microcontroller has the strengths of many others and unique technology, making it a worthy leader among 8-bit machines.
Selection of AVR series microcontrollers
AVR microcontroller series are complete and can be applied to various occasions. AVR microcontrollers have 3 grades:
Low-end Tiny series AVR MCU: mainly Tiny11/12/13/15/26/28, etc.;
Mid-range AT90S series AVR MCU: mainly AT90S1200/2313/8515/8535, etc. (being phased out or transitioning to Mega)
High-end ATmega series AVR microcontrollers: mainly include ATmega8/16/32/64/128 (storage capacity is 8/16/32/64/128 KB) and ATmega8515/8535, etc.
Previous article:AVR MCU fuse configuration parameters
Next article:AVR4x4 matrix keyboard driver
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- Europe's three largest chip giants re-examine their supply chains
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- Design of automotive LIN communication simulator based on Renesas MCU
- When will solid-state batteries become popular?
- Adding solid-state batteries, CATL wants to continue to be the "King of Ning"
- The agency predicts that my country's public electric vehicle charging piles will reach 3.6 million this year, accounting for nearly 70% of the world
- U.S. senators urge NHTSA to issue new vehicle safety rules
- Giants step up investment, accelerating the application of solid-state batteries
- Guangzhou Auto Show: End-to-end competition accelerates, autonomous driving fully impacts luxury...
- Integer square root algorithm
- Combining the new 6-axis IMU with DSP to achieve high-performance motion tracking accuracy
- Six design issues for I2C isolators
- Visible Light Sensor White Paper (Chinese)
- How to connect the reed switch sensor to the microcontroller
- STMicroelectronics and Freescale to collaborate on automotive technology
- C2000 LaunchPad's SIC serial port sends data
- ssh network login
- What can damage the dp83848 chip? The reset pin is always low and the chip cannot start.
- 15 websites that changed the world in 15 years