ES M1-Note1
ES M1-Note1
A microcontroller is a single chip computer. In addition to the CPU, it contains RAM, ROM, I/O
ports, Timers etc. It is mostly used in embedded systems. Examples of 8 bit microcontrollers are:
Intel 8051, Atmel’s AVR, Zilog’s Z8, Microchip’s PIC. These are different from each other in their
architecture, registers, instruction set etc. So programs written for one microcontroller will not run
on the others. So for selecting a microcontroller, three factors are commonly considered.
1. It must fulfil the task efficiently and cost effectively, which includes
• Speed, Packaging, Power consumption, capacity of RAM and ROM, I/O pins and timers
2. Availability of software and hardware development tools such as compilers, assemblers,
debuggers, and emulators.
3. Availability of the microcontroller in required quantity.
Microcontroller Microprocessor
Special purpose General purpose
Contains RAM, ROM and IO ports in the chip RAM, ROM and I/O ports are to be added
externally
Not able to add extra memory or I/O ports Flexible to add extra memory or I/O ports
Used in Embedded systems Generally used in Computers
(appliances like Printer, TV, Camera, Security
systems etc.)
Use single voltage power Use many levels of voltage power
Use more number of registers Use less number
Generally based on Harvard architecture based on Von Neumann model
AVR ATMega32
I/O registers:
The I/O registers are used for special functions such as port operations, timer control, serial
communication etc.. It is also called Special Function Registers (SFRs). The I/O memory of
Atmega32 is 64 Bytes.
General Purpose RAM:
This memory is used to store data and parameters. Its size varies from one AVR microcontroller
to other. ATmega32 has 2KB General Purpose RAM. The total data memory of ATmega32 is 2144
Bytes (32 B GPR + 64 B I/O registers and 2044 B RAM). Following figure illustrate the structure
of Data memory.