ATmega16
Brief Inroduction
ATmega16-16PU
The AVR is a Modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The 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. Atmel's low power, high performance AVR microcontrollers handle demanding 8 and 16-bit applications. With a single cycle instruction RISC CPU, innovative Pico Power® technology, and a rich feature set, the AVR architecture ensures fast code execution combined with the lowest possible power consumption.The AVR microcontrollers are divided into 4 families tiny AVR, mega AVR, XMEGA and Application specific AVR. Among these 4 families of AVR here we are going to use a microcontroller of mega AVR family “ATmega16”.
ATmega16 is a RISC microcontroller. What does RISC means?
RISC means Reduced Instruction Ste Computing. As the name indicates, The RISC architecture has simple, hard-wired instructions which often take only one or a few clock cycles to execute. RISC machines feature a small and fixed code size with comparatively few instructions and few addressing modes. As a result, execution of instructions is very fast, but the instruction set is rather simple.
ATmega16 is a RISC microcontroller. What does RISC means?
RISC means Reduced Instruction Ste Computing. As the name indicates, The RISC architecture has simple, hard-wired instructions which often take only one or a few clock cycles to execute. RISC machines feature a small and fixed code size with comparatively few instructions and few addressing modes. As a result, execution of instructions is very fast, but the instruction set is rather simple.
Technical Specs..
CLOCK FREQUENCY
ATmega16 is a MEGA series micrcontroller which has an internal clock frequency of 1 MHz. ATmega 16, therefore works at a speed of 1 MIPS. MIPS means Millions of Instructions Per Second. This means that when Atmega16 is working without an external clock, it can process one million instructions in a second. This is pretty fast for a primitive microcontroller. The other important thing is that we can change the frequency of operation of uC. We just have to connect a quuartz crystal to our uC. The maximum possible value is 16MHz. So if i am using a 16MHz quartz crystal then, it means that my uC can process instructions at a speed of 16 MIPS.
Another method instead of using a crystal, is connecting a clock input based on NE555 or else by connecting an RC oscillator to the required pin on the uC.
Even then, it can only work till a maximum of 16 MHZ frequency.
MEMORY
MCUs most often are used for relatively simple tasks and hence do not need excessive amounts of memory, it is prudent to include a small amount of data and instruction memory on the chip. That way, total system cost is decreased considerably, and even if the memory is not expandable, you are not necessarily stuck with it: Different members in a MCU family usually provide different amounts of memory, so you can choose a particular MCU which offers the appropriate memory space.
Memory is generally divided into two, namely volatile and nonvolatile memory.Volatile memory retains its contents only so long as the system is powered on. On the other hand, a non volatile memory can be used to store and retain data even when the system is powered off.
Then why should you use volatile memory at all, when non-volatile memory is readily available? The problem here is that non-volatile memory is usually a lot slower, more involved to work with, and much more expensive. While the volatile memory in your PC has access times in the nanosecond range, some types of non-volatile memory will be unavailable for milliseconds after writing one lousy byte to them. So we will generally store all the data that we need to constantly access, in the volatile memory, when we boot up our microcontroller.
The memory in ATmega16 is divided into 3 sections:
1) FLASH code memory section
2) Data memory section
3) EEPROM memory section
ATmega16 is a MEGA series micrcontroller which has an internal clock frequency of 1 MHz. ATmega 16, therefore works at a speed of 1 MIPS. MIPS means Millions of Instructions Per Second. This means that when Atmega16 is working without an external clock, it can process one million instructions in a second. This is pretty fast for a primitive microcontroller. The other important thing is that we can change the frequency of operation of uC. We just have to connect a quuartz crystal to our uC. The maximum possible value is 16MHz. So if i am using a 16MHz quartz crystal then, it means that my uC can process instructions at a speed of 16 MIPS.
Another method instead of using a crystal, is connecting a clock input based on NE555 or else by connecting an RC oscillator to the required pin on the uC.
Even then, it can only work till a maximum of 16 MHZ frequency.
MEMORY
MCUs most often are used for relatively simple tasks and hence do not need excessive amounts of memory, it is prudent to include a small amount of data and instruction memory on the chip. That way, total system cost is decreased considerably, and even if the memory is not expandable, you are not necessarily stuck with it: Different members in a MCU family usually provide different amounts of memory, so you can choose a particular MCU which offers the appropriate memory space.
Memory is generally divided into two, namely volatile and nonvolatile memory.Volatile memory retains its contents only so long as the system is powered on. On the other hand, a non volatile memory can be used to store and retain data even when the system is powered off.
Then why should you use volatile memory at all, when non-volatile memory is readily available? The problem here is that non-volatile memory is usually a lot slower, more involved to work with, and much more expensive. While the volatile memory in your PC has access times in the nanosecond range, some types of non-volatile memory will be unavailable for milliseconds after writing one lousy byte to them. So we will generally store all the data that we need to constantly access, in the volatile memory, when we boot up our microcontroller.
The memory in ATmega16 is divided into 3 sections:
1) FLASH code memory section
2) Data memory section
3) EEPROM memory section