ATmega8 Basics

download ATmega8 Basics

of 21

Transcript of ATmega8 Basics

  • 7/29/2019 ATmega8 Basics

    1/21

    AVR

    ATMEGA 8

    MICRO-CONTROLLER

  • 7/29/2019 ATmega8 Basics

    2/21

    INTRODUCTION ATmega8 is a 8-bit microcontroller based on

    the AVR RISC architecture

    By executing powerful instructions in a singleclock cycle, the ATmega8 achieves throughput

    approaching 1 MIPS per MHz

  • 7/29/2019 ATmega8 Basics

    3/21

    Contd....

    In order to maximize performance and

    parallelism, the AVR uses a Harvard

    architecture- which separates memories and

    buses for program and data

    Instruction in program memory are executed

    with single level pipelining

    This concept enables instructions to beexecuted in every clock cycle

  • 7/29/2019 ATmega8 Basics

    4/21

    FEATURES

    High-performance 8 bit Microcontroller

    Up to 16 MIPS Throughput at 16 MHz

    32 x 8 General Purpose Working Registers Six ADC channels in PDIP package

    Internal Calibrated Oscillator

  • 7/29/2019 ATmega8 Basics

    5/21

    TYPES OF PACKAGES 28-pin PDIP (Plastic Dual In-line Package)

    32-pin TQFP (Thin Quad film Package)

  • 7/29/2019 ATmega8 Basics

    6/21

    MEMORYSEGMENTS 8K Bytes of Flash program memory

    512 Bytes EEPROM (Electrically Erasable

    Programmable Read Only Memory) 1K Byte Internal RAM (Random Access

    Memory)

  • 7/29/2019 ATmega8 Basics

    7/21

    Contd....

    Write/Erase Cycles: 10,000 Flash/100,000

    EEPROM

    Data retention: 20 years at 85C/100 years at

    25C

  • 7/29/2019 ATmega8 Basics

    8/21

    PIN OUT

  • 7/29/2019 ATmega8 Basics

    9/21

    PIN DESCRIPTION

    VCC Digital supply voltage

    GND Ground

    RESET A low level on this pin for longer thanthe minimum pulse length will generate a

    reset, even if the clock is not running

    AREF The analog reference pin for the A/DConverter

  • 7/29/2019 ATmega8 Basics

    10/21

    Contd....

    AVCC The supply voltage pin for the A/DConverter

  • 7/29/2019 ATmega8 Basics

    11/21

    PORTS

    Three ports i.e PortB, PortC, PortD

    Three registers associated with every port

    DDRx Data Direction Register

    PINx Port input

    PORTx- Port output

    *Notex is subscript and could be either of B, C, D

  • 7/29/2019 ATmega8 Basics

    12/21

    Port B (PB7..PB0)

    Port B is an 8-bit bi-directional I/O port

    Can be used either as a input port or as

    output port ( direction must be specified in

    programming)

  • 7/29/2019 ATmega8 Basics

    13/21

    REGISTER DESCRIPTION OF I/O PORTS

  • 7/29/2019 ATmega8 Basics

    14/21

  • 7/29/2019 ATmega8 Basics

    15/21

    Port C (PC5..PC0)

    Port C is an 7-bit bi-directional I/O port

    Can be used either as a input port or as

    output port ( direction must be specified in

    programming)

  • 7/29/2019 ATmega8 Basics

    16/21

    Port D (PD7..PD0)

    Port D is an 8-bit bi-directional I/O port

    Can be used either as a input port or as

    output port ( direction must be specified in

    coding)

  • 7/29/2019 ATmega8 Basics

    17/21

    Contd....

  • 7/29/2019 ATmega8 Basics

    18/21

    Contd....

  • 7/29/2019 ATmega8 Basics

    19/21

    Contd....

  • 7/29/2019 ATmega8 Basics

    20/21

    Contd....

  • 7/29/2019 ATmega8 Basics

    21/21

    Thank you