Sunday, November 23, 2014

INSIDE ATMEGA-16 MICROCONTROLLERS

A single chip facilitating some of the external peripherals on it designed to perform a specific function is called as a microcontroller. It is an integrated circuit having a fixed number of input and output ports, fixed data and program memory and inbuilt timer.

How it works?
A microcontroller is programmed using assembly language or embedded C, with the help of a programmer. When we turn the controller ON and connect it to the system, our system will work according to the program being run in the controller.
We would be using ATMEGA-16 microcontrollers to control our system. A 40 pins IC which have following features-

·         4 bidirectional I/O ports
·         Low power 8-bit microcontroller
·         Supports serial communication
·         1K byte internal RAM
·         512 bytes EEPROM
·         32x8 General purpose registers
·       Programming lock for software security available.

Pin Descriptions

·         VCC
Digital supply voltage.

·         GND
Ground.

·         Port A (PA7:PA0)
Port A serves as the analog inputs to the A/D Converter.
Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up resistors (selected for each bit).
The Port A output buffers have symmetrical drive characteristics with both high sink and source capability.
When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated.
The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running.

·         Port B (PB7:PB0)
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port B output buffers have symmetrical drive characteristics with both high sink and source capability.
As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated.
The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running.

·         Port C (PC7:PC0)
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port C output buffers have symmetrical drive characteristics with both high sink and source capability.
As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated.
The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs.

·         Port D (PD7:PD0)
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port D output buffers have symmetrical drive characteristics with both high sink and source capability.
As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated.
The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running.

·         RESET
Reset Input. A low level on this pin for longer than the minimum pulse length will generate a reset even if the clock is not running. The minimum pulse length is given in Shorter pulses are not guaranteed to generate a reset.

·         XTAL1
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.

·         XTAL2
Output from the inverting Oscillator amplifier.

·         AVCC
AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter.

·         AREF
AREF is the analog reference pin for the A/D Converter.

Integrated Development Environment
Software which helps to develop our code efficiently without much muddling efforts, all in one solution, is called Integrated Development Environment (IDE). It performs-
Compilation
Assembly
Linking
Translations
Text editing


WINAVR, CVAVR, AVR studio, etc. are some of the development software and we would prefer CVAVR as IDE for ATMEGA-16. The keywords used to develop programs are quite familiar to us in it. CVAVR stands for Code Vision Advance Virtual RISC.

No comments:

Post a Comment