Hi all, We are introducing you to a new author Rakesh Bute today. Rakesh is an engineering student in the stream of Applied Electronics and Instrumentation from Asansol Engineering College. He will be writing a series of articles about AVR micro controllers, which later will be combined to form as a tutorial of the same.

Introduction to ATmega32 (AVR Series) 8bit Microcontroller

In our days, there have been many advancement in the field of Electronics and many cutting edge technologies are being developed every day, but still 8 bit microcontrollers have its own role in the digital electronics market dominated by 16-32 & 64 bit digital devices. Although powerful microcontrollers with higher processing capabilities exist in the market, 8bit microcontrollers still hold its value because of their easy-to-understand-operation, very much high popularity, ability to simplify a digital circuit, low cost compared to features offered, addition of many new features in a single IC and interest of manufacturers and consumers.

Today’s microcontrollers are much different from what it were in the initial stage, and the number of manufacturers are much more in count than it was a decade or two ago. At present some of the major manufacturers are Microchip (publication: PIC microcontrollers), Atmel (publication: AVR microcontrollers), Hitachi, Phillips, Maxim, NXP, Intel etc. Our interest is upon ATmega32. It belongs to Atmel’s AVR series micro controller family. Let’s see the features.

PIN count: Atmega32 has got 40 pins. Two for Power (pin no.10: +5v, pin no. 11: ground), two for oscillator (pin 12, 13), one for reset (pin 9), three for providing necessary power and reference voltage to its internal ADC, and 32 (4×8) I/O pins.

About I/O pins: ATmega32 is capable of handling analogue inputs. Port A can be used as either DIGITAL I/O Lines or each individual pin can be used as a single input channel to the internal ADC of ATmega32, plus a pair of pins AREF, AVCC & GND (refer to ATmega32 datasheet) together can make an ADC channel.

No pins can perform and serve for two purposes (for an example: Port A pins cannot work as a Digital I/O pin while the Internal ADC is activated) at the same time. It’s the programmers responsibility to resolve the conflict in the circuitry and the program. Programmers are advised to have a look to the priority tables and the internal configuration from the datasheet.

ADC: It has one successive approximation type ADC in which total 8 single channels are selectable. They can also be used as 7 (for TQFP packages) or 2 (for DIP packages) differential channels. Reference is selectable, either an external reference can be used or the internal 2.56V reference can be brought into action. There external reference can be connected to the AREF pin.

Communication Options: ATmega32 has three data transfer modules embedded in it. They are

Two Wire Interface

USART

Serial Peripheral Interface

Atmega32 pin diagram

Atmega32 pin diagram

Analog comparator: On-chip analog comparator is available. An interrupt is assigned for different comparison result obtained from the inputs.

Clock: It can run at a frequency from 1 to 16 MHz. Frequency can be obtained from external Quartz Crystal, Ceramic crystal or an R-C network. Internal calibrated RC oscillator can also be used.

More Features: Up to 16 MIPS throughput at 16MHz. Most of the instruction executes in a single cycle. Two cycle on-chip multiplication. 32 × 8 General Purpose Working Registers

Debug: JTAG boundary scan facilitates on chip debug.

Programming: Atmega32 can be programmed either by In-System Programming via Serial peripheral interface or by Parallel programming. Programming via JTAG interface is also possible. Programmer must ensure that SPI programming and JTAG are not be disabled using fuse bits; if the programming is supposed to be done using SPI or JTAG.