EMB-02 Overview uC Components

Embed Size (px)

Citation preview

  • 8/9/2019 EMB-02 Overview uC Components

    1/23

    EMB - AVRwww.protussystems.com

    11

    Parts of a GP Computer(Microcomputer)

    Contains separate

    Microprocesor(s)

    Memory Peripheral

    (I/O) devicHW

    serialport paralle

    port USB

    port

  • 8/9/2019 EMB-02 Overview uC Components

    2/23

    IntroducingMicrocontrollers

    A microprocessor is a central processing unit(CPU) on a single chip.

    When a microprocessor and associatedsupport circuitry, peripheral I/O componentsand memory (program as well as data) wereput together to form a small computer

    specifically for data acquisition and controlapplications, it was called a microcomputer.

    EMB - AVRwww.protussystems.com

    22

  • 8/9/2019 EMB-02 Overview uC Components

    3/23

    IntroducingMicrocontrollers

    When the components that make amicrocomputer were put together on a singlechip of silicon, it was called the microcontroller.

    EMB - AVRwww.protussystems.com

    33

  • 8/9/2019 EMB-02 Overview uC Components

    4/23

    Microcontrollers

    EMB - AVRwww.protussystems.com

    44

    Click to edit Master text stylesSecond level

    Third level Fourth level

    Fifth level

    A microcontroller

    interfaces to externaldevices with a

  • 8/9/2019 EMB-02 Overview uC Components

    5/23

    EMB - AVRwww.protussystems.com

    55

    How does a Microcomputer

    differ from a Microcontroller?

  • 8/9/2019 EMB-02 Overview uC Components

    6/23

    EMB - AVRwww.protussystems.com

    66

    Protus motherboard

  • 8/9/2019 EMB-02 Overview uC Components

    7/23

    EMB - AVRwww.protussystems.com

    77

    How does a Microcomputerdiffer from a Microcontroller?

    Microcontroller

    1-chip solution (monolithic)

    Built-in components (depending on variant) Microprocessor

    Memory: RAM/SRAM, EEPROM/EPROM/PROM/ROM

    Peripheral devices

    serial/parallel ports

    digital I/O ports

    Analog/Digital converter

    Timer/Counter

  • 8/9/2019 EMB-02 Overview uC Components

    8/23

    Inside an IC package

    CS-280Dr. Mark L. Hornick

    88

  • 8/9/2019 EMB-02 Overview uC Components

    9/23

    Inside an IC package

    CS-280Dr. Mark L. Hornick

    99

    Click to edit Master text stylesSecond level

    Third level Fourth level

    Fifth level

  • 8/9/2019 EMB-02 Overview uC Components

    10/23

    What does AVR RISC mean?

    The acronym AVR has been reported to stand for:

    Advanced Virtual RISC and also for the chip's designers:

    Alf-Egil Bogen and Vegard Wollan who designed the basic

    architecture at the Norwegian Institute of Technology.

    RISC stands forreduced instruction set computer.

    CPU design with a reduced instruction set as well as a

    simpler set ofinstructions (like for example PIC and AVR)

    EMB - AVRwww.protussystems.com

    1010

    http://en.wikipedia.org/wiki/CPU_designhttp://en.wikipedia.org/wiki/Instruction_(computer_science)http://en.wikipedia.org/wiki/Instruction_(computer_science)http://en.wikipedia.org/wiki/CPU_design
  • 8/9/2019 EMB-02 Overview uC Components

    11/23

    A little history

    The PIC (Programmable Interrupt Controller) appeared around 1980.

    8 bit bus

    executes 1 instruction in 4 clk cycles

    Harvard architecture

    AVR (1994)

    8 bit bus

    one instruction per cycle

    Harvard architecture

    EMB - AVRwww.protussystems.com

    1111

  • 8/9/2019 EMB-02 Overview uC Components

    12/23

    AVR 8-Bit RISC High Performance

    True single cycle execution

    single-clock-cycle-per-instruction execution

    PIC microcontrollers take 4 clock cycles per instruction

    One MIPS (mega instructions per second) per MHz

    up to 20 MHz clock

    32 general purpose registers

    provide flexibility and performance when using high level languages

    prevents access to RAM

    Harvard architecture

    separate bus for program and data memory

    EMB - AVRwww.protussystems.com

    1212

  • 8/9/2019 EMB-02 Overview uC Components

    13/23

    AVR 8-Bit RISC Low PowerConsumption

    1.8 to 5.5V operation

    will use all the energy stored in your batteries

    A variety of sleep modes

    AVR Flash microcontrollers have up to sixdifferent sleep modes

    fast wake-up from sleep modes

    Software controlled frequency

    EMB - AVRwww.protussystems.com

    1313

  • 8/9/2019 EMB-02 Overview uC Components

    14/23

    AVR 8-Bit RISC Compatibility

    AVR Flash microcontrollers share a single corearchitecture

    use the same code for all families

    1 Kbytes to 256 Kbytes of code

    8 to 100 pins

    all devices haveInternal oscillators

    EMB - AVREMB - AVR

    1414

  • 8/9/2019 EMB-02 Overview uC Components

    15/23

    AVR

    Modern RISC architecture: Compact and FAST.

    Tuned for high level languages.

    Consistent architecture across entire line.

    Small AVR are subsets of larger chips: Same hardware and code

    works across all chips.

    I/O structure reduces need for external components.

    Flash based, ultra trivial downloading of code.

    EMB - AVRwww.protussystems.com

    1515

  • 8/9/2019 EMB-02 Overview uC Components

    16/23

    AVR RISC Architecture

    Single Cycle Instructions: 8mhz = 8mips.

    Large register file (32).

    Every register an accumulator.

    3 index register pairs

    Register & IO are mapped in SRAM space.

    EMB - AVRwww.protussystems.com

    1616

  • 8/9/2019 EMB-02 Overview uC Components

    17/23

    Typical Hardware Support

    Internal or External Oscillator/Clock

    Brown Out Detector

    One or more timers

    Two or more PWM

    One or more USART

    I2C

    EMB - AVRwww.protussystems.com

    1717

  • 8/9/2019 EMB-02 Overview uC Components

    18/23

    Tools

    Atmel Studio: IDE & Simulator/debugger.

    BASCOM: Basic compiler & IDE with programmer.

    GNU C compiler (free, very high quality).

    Third party C compilers vary from cheap to very expensive.

    FLASH programmers are trivial to make.

    EMB - AVRwww.protussystems.com

    1818

  • 8/9/2019 EMB-02 Overview uC Components

    19/23

    Typical Hardware Support

    t Real time clock

    t 10bit ADC

    t Analog Comparator

    t External interrupts

    t Pulse timing capture

    t EEPROM

    t USB/CAN/RF

    EMB - AVRwww.protussystems.com

    1919

  • 8/9/2019 EMB-02 Overview uC Components

    20/23

    AVR Architecture

    EMB - AVRwww.protussystems.com

    2020

    Click to edit Master text stylesSecond level

    Third level Fourth level

    Fifth level

  • 8/9/2019 EMB-02 Overview uC Components

    21/23

    CS-280Dr. Mark L. Hornick

    2121

    Atmel Atmega32l Central Processing Unit

    l Arithmetic Logic Unit (ALU)performs the actual arithmetic,logical, and bit-functions

    l Memory SRAM, EEPROM,Flash, etc.

    l Clock circuit internal/external

    l I/O Input/Output; video, serial,parallel, USB, SCSI, etc.

  • 8/9/2019 EMB-02 Overview uC Components

    22/23

    EMB - AVRwww.protussystems.com

    2222

  • 8/9/2019 EMB-02 Overview uC Components

    23/23

    EMB - AVRwww protussystems com

    2323

    Atmel Atmega32 highlights

    An 8-bit microcontroller

    Native data size is 1 byte

    16-bit data addressing

    Up to 64 kB data memory can be accessed

    3 separate on-chip memories (Harvard architecture)

    2KB SRAM (for data)

    1KB EEPROM (for persistent data storage)

    32KB Flash organized in 16-bit words (16KWords) for program code

    I/O ports A-DDigital input, output

    Analog input

    Serial/Parallel

    Pulse accumulator