Atmel AVR Microcontroller Primer: Programming and InterfacingThis textbook provides practicing scientists and engineers a primer on the Atmel AVR microcontroller. In this second edition we highlight the popular ATmega164 microcontroller and other pin-for-pin controllers in the family with a complement of flash memory up to 128 kbytes. The second edition also adds a chapter on embedded system design fundamentals and provides extended examples on two different autonomous robots. Our approach is to provide the fundamental skills to quickly get up and operating with this internationally popular microcontroller. We cover the main subsystems aboard the ATmega164, providing a short theory section followed by a description of the related microcontroller subsystem with accompanying hardware and software to exercise the subsystem. In all examples, we use the C programming language. We include a detailed chapter describing how to interface the microcontroller to a wide variety of input and output devices and conclude with several system level examples. Table of Contents: Atmel AVR Architecture Overview / Serial Communication Subsystem / Analog-to-Digital Conversion / Interrupt Subsystem / Timing Subsystem / Atmel AVR Operating Parameters and Interfacing / Embedded Systems Design |
Contents
Atmel AVR Architecture Overview | 1 |
Serial Communication Subsystem | 23 |
AnalogtoDigital Conversion | 39 |
Interrupt Subsystem | 67 |
Timing Subsystem | 77 |
Atmel AVR Operating Parameters and Interfacing | 113 |
Other editions - View all
Common terms and phrases
activity diagram ADCSRA analog signal application ATmega164 is equipped Atmel ATmega164 Atmel AVR AVR line Barrett baud rate ceramic resonator chapter clock source compare match configuration control signal convert cursor home Data Register DD RAM location define delay device digital signals discuss display dot matrix display EEPROM embedded system encoder external Fast PWM flag free running counter frequency function H-bridge hardware initialize Input Capture keypad left motor maze microcontroller number of bits OC2A OCR1BL operational amplifier Output Compare Register overflow interrupt parameters parity PORTB PORTC PORTD provided in Figure pulse width modulated putchar putchar(’E PWM duty cycle PWM signal quantization levels Reserved reset resistor right motor robot sampling sensor serial communication shown in Figure Status Register stepper motor subsystem TCCR1A TCNTO timer system Timer/Counter0 transmission UML activity diagram unsigned int USART variables void volatile unsigned char voltage