ATMega16 Pinout Diagram, Specifications, Features & Datasheet

Board of Pinout Diagram

ATMEGA16 Pin Configuration

1PB0(XCK/T0)Pin 0 of  PORTBT0( Timer0 External Counter Input)XCK ( USART External Clock I/O)
2PB1(T1)Pin 1 of  PORTBT1(Timer1 External Counter Input)
3PB2(INT2/AIN0)Pin 2 of  PORTBAIN0(Internal Analog Comparator Positive Input) INT2( External Interrupt 2 Input)
4PB3(OC0/AIN1)Pin 3 of  PORTBAIN1(Internal Analog Comparator Negative Input) OC0 (Timer0 Output Compare Match Output) or  PWM output 
5PB4(SS )Pin 4 of  PORTBSS (SPI Slave Select Input).  This pin is low when controller acts as slave. [Serial Peripheral Interface (SPI) for programming]
6PB5(MOSI)Pin 5 of  PORTBMOSI (Master Output Slave Input). When controller acts as slave, the data is received by this pin.[Serial Peripheral Interface (SPI) for programming]
7PB6(MISO)Pin 6 of  PORTBMISO (Master Input Slave Output). When controller acts as slave, the data is sent to master through this pin.  [Serial Peripheral Interface (SPI) for programming]
8PB7(SCK)Pin 7 of  PORTBSCK (SPI Bus Serial Clock). This is the clock shared between this controller and other system for accurate data transfer.[Serial Peripheral Interface (SPI) for programming]
9RESET Reset Pin (Active Low Reset) 
10VCCConnected to +5V 
11GNDConnected to GROUND 
12XTAL2Connected to Crystal Oscillator 
13XTAL1Connected to Crystal Oscillator 
14PD0(RXD)Pin 0 of  PORTDRXD (USART Input Pin) [USART Serial Communication Interfacecan be used for programming]
15PD1(TXD)Pin 1 of  PORTDTXD (USART Output Pin) [USART Serial Communication Interfacecan be used for programming]
16PD2(INT0)Pin 2 of  PORTDExternal Interrupt INT0
17PD3(INT1)Pin 3 of  PORTDExternal Interrupt INT1
18PD4(OC1B)Pin 4 of  PORTDOC1B (Timer Output Compare Match Output) or  PWM output
19PD5(OC1A)Pin 5 of  PORTDOC1A (Timer Output Compare Match Output) or  PWM output
20PD6(ICP)Pin 6 of  PORTDTimer/Counter1 Input Capture Pin
21PD7 (OC2)Pin 7 of  PORTDTimer/Counter2 Output Compare Match Output
22PC0 (SCL)Pin 0 of  PORTCTWI Interface
23PC1 (SDA)Pin 1 of  PORTCTWI Interface
24PC2 (TCK)Pin 2 of  PORTCJTAG Interface
25PC3 (TMS)Pin 3 of  PORTCJTAG Interface
26PC4 (TDO)Pin 4 of  PORTCJTAG Interface
27PC5 (TDI)Pin 5 of  PORTCJTAG Interface
28PC6 (TOSC1)Pin 6 of  PORTCTimer Oscillator Pin 1
29PC7 (TOSC2)Pin 7 of  PORTCTimer Oscillator Pin 2
30AVccVcc for Internal ADC  Converter 
32AREFAnalog Reference Pin for ADC 
33PA7 (ADC7)Pin 7 of  PORTAADC (Analog to Digital Converter) Channel 7
34PA6 (ADC6)Pin 6 of  PORTAADC (Analog to Digital Converter) Channel 6
35PA5 (ADC5)Pin 5 of  PORTAADC (Analog to Digital Converter) Channel 5
36PA4 (ADC4)Pin 4 of  PORTAADC (Analog to Digital Converter) Channel 4
37PA3 (ADC3)Pin 3 of  PORTAADC (Analog to Digital Converter) Channel 3
38PA2 (ADC2)Pin 2 of  PORTAADC (Analog to Digital Converter) Channel 2
39PA1 (ADC1)Pin 1 of  PORTAADC (Analog to Digital Converter) Channel 1
40PA0 (ADC0)Pin 0 of  PORTAADC (Analog to Digital Converter) Channel 0

ATMEGA16 Features

ATMEGA16 – Simplified Features
CPU8-bit AVR
Number of Pins40
Operating VoltageFor ATMEGA16:+4.5 to +5.5 V (+5.5V being absolute maximum)For ATMEGA16L:+2.7 to 5.5V(+5.5V being absolute maximum)
Number of Input/output pins32
Communication InterfaceJTAG Interface(24,25,26,27 PINS)[Can be used for programming this controller]SPI Serial Interface(5,6,7,8 PINS) [Can be used for programming this controller]Programmable Serial USART(14,15 PINS) [Can be used for programming this controller]Two-wire Serial Interface(22,23 PINS)[Can be used to connect peripheral devices like sensors and servos]
ADC Module8 channels , 10-bit resolution ADC
Timer ModuleTwo 8-bit counters, One 16-bit counter [Total three]
Analog Comparators1
DAC ModuleNil
PWM channels4
External Oscillator0-8MHz for ATMEGA16L0-16MHz for ATMEGA16
Internal Oscillator0-8MHz  Calibrated Internal Oscillator
Program Memory TypeFlash
Program Memory16Kbytes[10000 write/erase cycles]
CPU Speed16 MIPS
RAM Bytes1KBytes
Data EEPROM512 Bytes
Watchdog TimerYes
Power Save ModesSix Modes[Idle, ADC Noise Reduction, Power-save, Power-down, Standby and Extended Standby]
Operating Temperature-55°C to +125°C(+125 being absolute maximum, -55 being absolute minimum)

ATMEGA16 Electrical Characteristics

  • Maximum voltage on any pin except RESET : -0.5V to ( Vcc + 0.5)V
  • Maximum voltage on RESET pin : -0.5V to +13.0V
  • Maximum DC current allowed through any I/O pin : 40mA
  • Maximum DC current through Vcc and GND pins: 200mA
  • Storage temperature:-65ºC to +150ºC

ATMEGA16 Replacements


ATMEGA16 Alternatives


Where to use ATMEGA16

ATMEGA16 microcontroller is one of the popular controllers in AVR series. With its features and purchase cost it became one of favorite controller for both hobbyists and engineers. ATMEGA16 programming is similar to any other AVR controller.  It is particularly a clone to ATMEGA32 except for the memory. Although it has only half the memory of ATMEGA32, it is still more than enough to satisfy most EMBEDDED SYSTEMS.

ATMEGA16 has also sleep modes. The modes can be triggered at desired times to save power. With various sleep modes on board ATMEGA16 can work on MOBILE EMBEDDED SYSTEMS.

ATMEGA16 has 32 programmable Input/output pins, with them ATMEGA16 can interface many peripherals easily.

ATMEGA16 has also programmable Watchdog Timer with Separate On-chip Oscillator. With this Watchdog timer to reset under error the controller can be used on applications where human interference in minimal. 

How to Use ATMEGA16 Microcontroller

As mentioned earlier ATMEGA16 is similar to any other microcontroller and in particular ATMEGA32. It basically can perform any function that is performed by ATMEGA32. Similar to them it is not Plug and Play digital ICs. For working of ATMEGA16, first we need to save the program HEX code in ATMEGA16 FLASH MEMORY. After executing this code ATMEGA16 creates the desired response.

Entire process of using an ATMEGA16 goes like this:

  1. List the functions to be executed by ATMEGA16 in a paper.
  2. Next download program developing application (called IDE) for AVR controllers

 (Usually Atmel Studio 6.2 for Windows7,

 Atmel Studio 7 for Windows10 [ ])

  1. Write the functions in ‘C’ language in IDE.
  2. After writing the program compile it in IDE. This eliminates errors.
  3. Make IDE application to generate HEX file for the written program after compiling.
  4. Choose the programming device (usually SPI programmer made for AVR controllers) which establishes communication between your Personal Computer and ATMEGA16.
  5. Run the HEX file burning software which is given for the chosen programming device.
  6. Choose the appropriate program HEX file in the programmer software.
  7. Burn the HEX file (Which contains program in the form of HEX code) in ATMEGA16 flash memory using this program.

Disconnect the programmer, connect the appropriate peripherals for the controller and power the system. With this ATMEGA16 executes the program and provides the response written in the saved program.


There are many of applications for ATMEGA16 microcontrollers.

  • Hobbyists applications
  • Engineers design
  • Temperature control systems
  • Analog signal measuring and manipulations.
  • Embedded systems like coffee machine, vending machine.
  • Motor control systems.
  • Digital signal processing.
  • Peripheral Interface system.
Component Datasheet PDF: ATMega16 Microcontroller Datasheet  

Leave a Comment