AVR Tutorials
The Best AVR Microcontroller Tutorials on the Web

Microcontrollers Basics

Tutorial Objectives

After completing this AVR microcontroller tutorial readers should be able to:
  • Give a technical definition for the term microcontroller.
  • List the components that constitute a microcontroller.
  • Explain the functions of the microcontroller's components.
  • List at least three of the major developer/manufacturer of popular microcontrollers.

Microcontroller Overview & Basic Layout

Definition: A microcontroller is a single chip containing at least a CPU, non-volatile memory, volatile memory, a timer and an I/O control unit.

Basically a microcontroller can be described as a computer on a chip. The difference between a microcontroller and a regular PC is that the PC is a general purpose computer while a microcontroller is a computer dedicated to one or just a few tasks.

A microcontroller apart from the above mentioned components usually also include, but not limited to, serial communication capabilities, interrupt controls and analog I/O capabilities. The figure below gives the basic layout of a general AVR microcontroller.

AVR Microcontroller Components

Major manufacturers of microcontrollers include:

  • Atmel Corp. - Manufacturers of the popular AVR series of microcontrollers.
  • Microchip Technology Inc. - Manufacturers of the PIC series of microcontrollers.
  • Texas Instruments Inc. - One of the world's largest semiconductor companies..
  • Renesas Technology Corp. - A joint merger of Hitachi and Mitsubishi product lines.

Microcontroller Components/Peripherials

Processor - The processor refers to the Central Processing Unit (CPU) of the microcontroller. It contains the Arithmetic Logic Unit (ALU), Control Unit, Instruction Decoder and some Special Registers (Stack Pointer, Status Register, Program Counter, etc.).

Volatile Memory - This is memory used by ht microcontroller for temporary data storage, system setup and peripherals configurations. Memory in this category includes SRAM and DRAM. AVR microcontrollers utilize SRAM.

Non-Volatile Memory - This is memory used by the microcontroller to store programs. Data can also be stored in this memory but the access time is much slower than that of RAM. Memory in this category includes ROM, PROM, EPROM, EEPROM and FLASH. The AVR microcontrollers utilize Flash for program storage, some AVR controllers contains a bit of EEPROM as well.

Timer Module - Most microcontrollers have at least one timer/counter peripheral. Timer/Counter modules are used to perform timing or counting operations in the controller. These include time stamping, measuring intervals, counting events, etc.

Interrupt Module - Interrupts enable the microcontroller to monitor certain events in the background while executing and application program and react to the event if necessary pausing the original program. This is all coordinated by the interrupt module.

Digital I/O Module - This module allows digital/logic communication with the microcontroller and the external world. Communication signals are that of TTL or CMOS logic.

Analog I/O Modules - These modules are use to input/output analog information from/to the external world. Analog modules include Analog Comparators and Analog-to-Digital Converters.

Serial Modules - These modules are used for serial communication with the external world. An example is the USART peripherial which utilizes the RS232 standard.