As we have discussed earlier that AVR is quite advanced than Intel 8051 and many other microcontrollers in terms of power consumption, architecture, no of bits, no of clock cycles reqd to execute instructions, type of memory, size of memory, peripheral features like ADC , SPI, USART/UART, I2C , Timers etc., oscillator support , I/o packages , o/p volt ., speed.
Criteria for choosing microcontroller:
- five major 8bit MCU companies
- Atmel AVR
- Pic from Microchip Technical
all are different which means the program for one will not work for other!MCU should meet the computing needs efficiently and cost effectively.
We must first see whether an 8-bit,16-bit or 32-bit MCU is needed then,
- power consumption
- the amt of ram and rom
- no of I/o pins
- no of timers on chip
- ease of upgrade
- availability of software and hardware dev. Tools
- software or support package availability such as compilers, assemblers etc
- wide availability and sources of MCU
- ready availability in needed quantities both now and in future
Note that Freescale, Atmel, Intel, Zilog etc have all the dedicated massive resources needed to ensure wide and timely availability of their products because their products are stable, mature and single soured.There fore we choose to use AVR as our microcontroller in later discussions.
AVR is a family of microcontrollers developed by Atmel beginning in 1996. These are modified Harvard architecture 8-bit RISC single-chip microcontrollers. AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.
AVR microcontrollers find many applications as embedded systems, they are also used in the Arduino line of open source board designs.
The AVR architecture was conceived by two students at the Norwegian Institute of Technology (NTH), Alf-Egil Bogen and Vegard Wollan.
The original AVR MCU was developed at a local ASIC house in Trondheim, Norway, called Nordic VLSI at the time, now Nordic Semiconductor, where Bogen and Wollan were working as students. It was known as a μRISC (Micro RISC) and was available as silicon IP/building block from Nordic VLSI. When the technology was sold to Atmel from Nordic VLSI, the internal architecture was further developed by Bogen and Wollan at Atmel Norway, a subsidiary of Atmel. The designers worked closely with compiler writers at IAR Systems to ensure that the AVR instruction set provided efficient compilation of high-level languages.
Atmel says that the name AVR is not an acronym and does not stand for anything in particular. The creators of the AVR give no definitive answer as to what the term “AVR” stands for. However, it is commonly accepted that AVR stands for Alf and Vegard’s RISC processor. Note that the use of “AVR” in this article generally refers to the 8-bit RISC line of Atmel AVR Microcontrollers.
Among the first of the AVR line was the AT90S8515, which in a 40-pin DIP package has the same pinout as an 8051 microcontroller, including the external multiplexed address and data bus. The polarity of the RESET line was opposite (8051’s having an active-high RESET, while the AVR has an active-low RESET), but other than that the pinout was identical.
The AVR 8-bit microcontroller architecture was introduced in 1997. By 2003, Atmel had shipped 500 million AVR flash microcontrollers. The Arduino platform for simple electronics projects was released in 2005 and featured ATmega8 AVR microcontrollers.
AVRs are generally classified into following:
- tinyAVR– the ATtiny series
- 5–16 KB program memory
- 6–32-pin package
- Limited peripheral set
- megaAVR– the ATmega series
- 4–256 KB program memory
- 28–100-pin package
- Extended instruction set
- Extensive peripheral set
- XMEGA– the ATxmega series
- 16–384 KB program memory
- 44–64–100-pin package (A4, A3, A1)
- 32-pin package: XMEGA-E (XMEGA8E5)
- Extended performance features, such as DMA, “Event System”, and cryptography support
- Extensive peripheral set with ADCs
- Application-specific AVR
- megaAVRs with special features not found on the other members of the AVR family, such as LCD controller, USB controller, advanced PWM, CAN, etc.
- FPSLIC (AVR with FPGA)
- FPGA5k to 40k gates
- SRAM for the AVR program code, unlike all other AVRs
- AVR core can run at up to 50 MHz
- 32-bit AVRs
In 2006, Atmel released microcontrollers based on the 32-bit AVR32 architecture. This is a completely different architecture unrelated to the 8-bit AVR, intended to compete with the ARM-based processors. It has a 32-bit data path, SIMD and DSP instructions, along with other audio- and video-processing features. The instruction set is similar to other RISC cores, but it is not compatible with the original AVR (nor any of the various ARM cores).
High-performance, Low-power AVR 8-bit Microcontroller
- Advanced RISC Architecture
– 131 Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Up to 16 MIPS Throughput at 16MHz
– Fully Static Operation
– On-chip 2-cycle Multiplier
- Non-Volatile Program and Data Memories
– 16k Bytes of In-System Self-Programmable Flash
– Optional Boot Code Section with Independent Lock Bits
– 512 Bytes EEPROM
– Programming Lock for Software Security
- JTAG Interface
– Boundary-scan Capabilities According to the JTAG Standard
– Extensive On-chip Debug Support
– Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface
- Peripheral Features
– On-chip Analog Comparator
– Programmable Watchdog Timer with Seperate On-chip Oscillator
– Master/Slave SPI Serial Interface
– Two 8-bit Timer/Counters with Separate Prescalar, Compare
– One 16-bit TImer/Counter with Seperate Prescaler, Compare and Capture mode
– Real Time Counter with Seperate Oscillator
– Four PWM Channels
– Programmable Serial USART
– 8-channel, 10-bit ADC
– Byte-oriented Two-wire Serial Interface
- Special Microcontroller Features
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated RC Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and Extended Standby
- I/O and Packages
– 32 Programmable I/O Lines
– 40-pin PDIP, 44-lead TQFP, and 44-pad MLF
- Operating Voltages
– 4.5-5.5V for ATmega16
- Speed Grades
– 0-16MHz for ATmega16
- Power Consumption at 4 Mhz, 3V, 35 °C
– Active: 1.1mA
– Idle Mode: 0.35mA
– Power-down Mode: < 1µA
at this point of time, we will discuss only some of the features of Atmega 16, other topics will be discussed later on!!let’s see how we can make our MCU to work faster, there are around 3 ways to increase the processing power of an MCU.
- increase the clock frequency of the chip. One drawback of this is that the higher the frequency, the more the power-consumption and heat dissipation.power-consumption and heat dissipation are serious problems in hand held devices.
- Use Harvard architecture by increasing the no of buses to bring more info the CPU.
- Change the internal architecture of the CPU and use what is called RISC architecture.
In AVR 2 and 3 are used and 1st can also be used if the user wants, therefore it is fast and reliable.