Atmel AVR Microcontroller Primer

Book description

This textbook provides practicing scientists and engineers a primer on the Atmel AVR microcontroller. Our approach is to provide the fundamental skills to quickly get up and operating with this internationally popular microcontroller. The Atmel ATmega16 is used as a representative sample of the AVR line. The knowledge you gain on the ATmega16 can be easily translated to every other microcontroller in the AVR line. We cover the main subsystems aboard the ATmega16, providing a short theory section followed by a description of the related microcontroller subsystem with accompanying hardware and software to exercise the subsytem. In all examples, we use the C programming language. We conclude with a detailed chapter describing how to interface the microcontroller to a wide variety of input and output devices. Table of Contents: Atmel AVR Architecture Overview / Serial Communication Subsystem / Analog-to-Digital Conversion / Interrupt Subsystem / Timing Subsystem / Atmel AVR Operating Parameters and Interfacing / ATmega16 Register Set / ATmega16 Header File

Table of contents

  1. Atmel AVR Microcontroller Primer: Programming and Interfacing
  2. Preface
  3. Acknowledgments
  4. Atmel AVR Architecture Overview
    1. ATmega16 ARCHITECTURE OVERVIEW
      1. Reduced Instruction Set Computer
      2. Assembly Language Instruction Set
      3. ATmega16 Architecture Overview
    2. NONVOLATILE AND DATA MEMORIES
      1. In-System Programmable Flash EEPROM
      2. Byte-Addressable EEPROM
      3. Static Random Access Memory
      4. Programmable Lock Bits
    3. PORT SYSTEM
    4. PERIPHERAL FEATURES---INTERNAL SUBSYSTEMS
      1. Time Base
      2. Timing Subsystem
      3. Pulse Width Modulation Channels
      4. Serial Communications
        1. Serial USART
        2. Serial Peripheral Interface
        3. Two-Wire Serial Interface
      5. Analog-to-Digital Converter
      6. Interrupts
    5. PHYSICAL AND OPERATING PARAMETERS
      1. Packaging
      2. Power Consumption
      3. Speed Grades
    6. APPLICATION: ATmega16 TESTBENCH
      1. Hardware Configuration
      2. Software Configuration
    7. PROGRAMMING THE ATmega16
      1. Programming Procedure
    8. SOFTWARE PORTABILITY
    9. SUMMARY
    10. REFERENCES AND FURTHER READING
    11. CHAPTER PROBLEMS
  5. Serial Communication Subsystem
    1. SERIAL COMMUNICATIONS
    2. SERIAL COMMUNICATION TERMINOLOGY
      1. Asynchronous versus Synchronous Serial Transmission
      2. Baud Rate
      3. Full Duplex
      4. Nonreturn to Zero Coding Format
      5. The RS-232 Communication Protocol
      6. Parity
      7. American Standard Code for Information Interchange
    3. SERIAL USART
      1. System Overview
        1. USART Clock Generator
        2. USART Transmitter
        3. USART Receiver
        4. USART Registers
      2. System Operation and Programming
      3. Serial Peripheral Interface
        1. SPI Operation
        2. Registers
        3. Programming
    4. TWO-WIRE SERIAL INTERFACE
    5. SUMMARY
    6. REFERENCES AND FURTHER READING
    7. CHAPTER PROBLEMS
  6. Analog-to-Digital Conversion
    1. BACKGROUND THEORY
      1. Analog versus Digital Signals
      2. Sampling, Quantization, and Encoding
      3. Resolution and Data Rate
    2. ANALOG-TO-DIGITAL CONVERSION PROCESS
    3. ADC CONVERSION TECHNOLOGIES
      1. Successive Approximation
      2. Integration
      3. Counter-Based Conversion
      4. Parallel Conversion
    4. THE ATMEL ATmega16 ADC SYSTEM
      1. Block Diagram
      2. Registers
        1. ADC Multiplexer Selection Register
        2. ADC Control and Status Register A
        3. ADC Data Registers (ADCH and ADCL)
      3. Programming the ADC
      4. Digital-to-Analog Conversion
    5. SUMMARY
    6. REFERENCES AND FURTHER READING
    7. CHAPTER PROBLEMS
  7. Interrupt Subsystem
    1. INTERRUPT THEORY
    2. ATmega16 INTERRUPT SYSTEM
    3. PROGRAMMING AN INTERRUPT
    4. APPLICATION
      1. External Interrupts
      2. Internal Interrupt
    5. SUMMARY
    6. REFERENCES AND FURTHER READING
    7. CHAPTER PROBLEMS
  8. Timing Subsystem
    1. OVERVIEW
    2. TIMING-RELATED TERMINOLOGY
      1. Frequency
      2. Period
      3. Duty Cycle
    3. TIMING SYSTEM OVERVIEW
    4. APPLICATIONS
      1. Input Capture---Measuring External Timing Event
      2. Counting Events
      3. Output Compare---Generating Timing Signals to Interface External Devices
      4. Industrial Implementation Case Study (PWM)
    5. OVERVIEW OF THE ATMEL TIMERS
    6. TIMER 0 SYSTEM
      1. Modes of Operation
        1. Normal Mode
        2. Clear Timer on Compare Match
        3. Phase Correct PWM Mode
        4. Fast PWM
      2. Timer 0 Registers
        1. Timer/Counter Control Register 0
        2. Timer/Counter Register
        3. Output Compare Register
        4. Timer/Counter Interrupt Mask Register
        5. Timer/Counter Interrupt Flag Register
    7. TIMER 1
      1. Timer 1 Registers
        1. TCCR1A and TCCR1B Registers
        2. Timer/Counter Register 1 (TCNT1H/TCNT1)
        3. Output Compare Register 1 Channel A (OCR1AH/ OCR1AL)
        4. Output Compare Register 1 Channel B (OCR1BH/ OCR1BL)
        5. Input Capture Register 1 (ICR1H/ICR1L)
        6. Timer/Counter Interrupt Mask Register (TIMSK)
        7. Timer/Counter Interrupt Flag Register (TIFR)
    8. TIMER 2
      1. Timer/Counter Control Register 2
      2. Timer/Counter Register (TCNT2)
      3. Output Compare Register (OCR2)
      4. Timer/Counter Interrupt Mask Register (TIMSK)
      5. Timer/Counter Interrupt Flag Register
    9. PROGRAMMING THE TIMER SYSTEM
      1. Precision Delay
      2. Pulse Width Modulation
      3. Input Capture Mode
    10. SUMMARY
    11. REFERENCES AND FURTHER READING
    12. CHAPTER PROBLEMS
  9. Atmel AVR Operating Parameters and Interfacing
    1. OPERATING PARAMETERS
    2. INPUT DEVICES
      1. Switches
      2. Switch Debouncing
      3. Keypads
      4. Sensors
        1. Digital Sensors
        2. Analog Sensors
    3. OUTPUT DEVICES
      1. Light-Emitting Diodes
      2. Seven-Segment LED Displays
      3. Tristate LED Indicator
      4. Dot Matrix Display
      5. Liquid Crystal Display
      6. High-Power DC Devices
    4. DC MOTOR SPEED AND DIRECTION CONTROL
      1. DC Motor Operating Parameters
      2. AC Devices
    5. APPLICATION: FLIGHT SIMULATOR PANEL (1/6)
    6. APPLICATION: FLIGHT SIMULATOR PANEL (2/6)
    7. APPLICATION: FLIGHT SIMULATOR PANEL (3/6)
    8. APPLICATION: FLIGHT SIMULATOR PANEL (4/6)
    9. APPLICATION: FLIGHT SIMULATOR PANEL (5/6)
    10. APPLICATION: FLIGHT SIMULATOR PANEL (6/6)
    11. SUMMARY
    12. REFERENCES AND FURTHER READING
    13. CHAPTER PROBLEMS
  10. ATmega16 Register Set
  11. ATmega16 Header File (1/4)
  12. ATmega16 Header File (2/4)
  13. ATmega16 Header File (3/4)
  14. ATmega16 Header File (4/4)
  15. Author Biography
  16. Index

Product information

  • Title: Atmel AVR Microcontroller Primer
  • Author(s): Daniel J. Pack, Steven F. Barrett
  • Release date: June 2007
  • Publisher(s): Morgan & Claypool Publishers
  • ISBN: 9781598295429