
AVR Programming
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Cover
- Copyright
- Table of Contents
- Why This Book?
- Preface
- You Will Need.
- The Basic Kit
- For the Basic Projects
- For the Intermediate Projects
- For the Motors and H-Bridge Chapters
- Deluxe and Frills
- Conventions Used in This Book
- Using Code Examples
- Safari® Books Online
- How to Contact Us
- Acknowledgments
- Part I. The Basics
- Chapter 1. Introduction
- What Is a Microcontroller? The Big Picture
- A Computer on a Chip.
- .But a Very Small Computer
- What Can Microcontrollers Do?
- Hardware: The Big Picture
- The Core: Processor, Memory, and I/O
- Peripherals: Making Your Life Easier
- Chapter 2. Programming AVRs
- Programming the AVR
- Toolchain
- The Software Toolchain
- Linux Setup
- Windows Setup
- Mac Setup
- Arduino Setup
- Make and Makefiles
- AVR and the Arduino
- Arduino Pros
- Arduino Cons
- The Arduino: Hardware or Software? Both!
- The Arduino Is an AVR
- The Arduino Is an AVR Programmer
- Other Hardware Programmers
- Flash Programmers I Have Known and Loved
- Getting Started: Blinking LEDs
- Hookup
- ISP Headers
- AVRDUDE
- Configuring Your Makefile
- Flash
- Troubleshooting
- Chapter 3. Digital Output
- blinkLED Redux
- The Structure of AVR C Code
- Hardware Registers
- blinkLED Summary
- POV Toy
- Building the Circuit
- Pretty Patterns: The POV Toy Code
- Experiment!
- Chapter 4. Bit Twiddling
- Working Through the Code: Cylon Eyes
- Bit Twiddling and Cylon Eyes
- Bit Shifting
- Advanced Bit Twiddling: Above and Beyond Cylon Eyes
- Setting Bits with OR
- Toggling Bits with XOR
- Clearing a Bit with AND and NOT
- Showing Off
- Summary
- Chapter 5. Serial I/O
- Serial Communication
- Implementing Serial Communication on the AVR: Loopback Project
- Setup: Configuring the AVR
- Setup: Your Computer
- Setup: USB-Serial Adapter
- Putting It All Together: Test Out Your Loopback
- Troubleshooting Serial Connections
- Configuring USART: The Nitty-Gritty Details
- AVR Square-Wave Organ
- Making Music with Your Micro
- The Organ Library
- The Code
- Extra Goodies
- Summary
- Chapter 6. Digital Input
- Pushbuttons, Switches, Etc.
- Configuring Input: DDRs, PORTs, and PINs
- Interpreting Button Presses
- Changing State
- Debouncing
- Debounce Example
- AVR Music Box
- The Code
- Boss Button
- Desktop-side Scripting
- Extensions
- Chapter 7. Analog-to-Digital Conversion I
- ADC Hardware Overview
- Light Meter
- The Circuit
- The Code
- ADC Initialization
- Extensions
- Slowscope
- The AVR Code
- The Desktop Code
- Synergies
- AVR Night Light and the Multiplexer
- Multiplexing
- Setting the Mux Bits
- The Circuit
- The Code
- Summary
- Part II. Intermediate AVR
- Chapter 8. Hardware Interrupts
- External Interrupts 101: Real-time Button Pressing Examples
- External Interrupt 0 Example
- Pin-Change Interrupt Example
- Capacitive Sensor
- The Sensor
- The Code
- Global, Volatile Variables
- Debugging the Circuit
- Chapter 9. Introduction to the Timer/Counter Hardware
- Timer/Counters: Why and How?
- Test Your Reaction Time
- Using Timer 0 for a Better 8-Bit Organ
- AM Radio
- The Circuit
- CPU Speed
- AM Radio: The Code
- Summary
- Chapter 10. Pulse-Width Modulation
- Bright and Dim LEDs: PWM
- Brute-Force PWM Demo
- Timers PWM Demo
- Initializing Timers for PWM Mode
- PWM on Any Pin
- PWM on Any Pin Demo
- Closing: Alternatives to PWM and a Timer Checklist
- Chapter 11. Driving Servo Motors
- Servos
- The Secret Life of Servos
- The Circuit
- The Code
- Servo Sundial
- The Build
- Ready the Lasers!
- The Code
- Servo Sundial Calibration
- Chapter 12. Analog-to-Digital Conversion II
- Voltage Meter
- The Circuit
- The Code
- The Footstep Detector
- The Circuit
- The Theory
- Exponentially Weighted Moving Averages
- The Code
- Summary
- Part III. Advanced AVR Topics
- Chapter 13. Advanced PWM Tricks
- Direct-Digital Synthesis
- Making a Sine Wave
- Next Steps: Mixing and Volume
- Mixing
- Dynamic Volume Control
- Polling USART
- ADSR Envelope
- Auxiliary Files
- Chapter 14. Switches
- Controlling Big Loads: Switches
- Bipolar-Junction Transistors
- MOSFETs
- Power MOSFETs
- Relays
- Triacs and SSRs
- Switches: Summary
- DC Motors
- Chapter 15. Advanced Motors
- Going in Reverse: H-Bridges
- Code: Taking Your H-Bridge Out for a Spin
- Experts-Only H-Bridge
- PWM and the H-Bridge
- Drive Modes: Sign-Magnitude
- Drive Modes: Locked Anti-phase
- Drive Modes: Comparison
- Stepper Motors
- Kinds of Stepper Motors
- Full Stepping and Half Stepping
- Identification of Stepper Motor Wires
- Too Many Wires!
- Dual H-Bridge Chips: The SN754410
- The Code
- Acceleration Control
- Microstepping
- Chapter 16. SPI
- How SPI Works
- Bit Trading Example
- Shift Registers
- EEPROM External Memory
- External Memory
- SPI Demo Hookup
- SPI Demo Code
- SPI EEPROM Library Header
- SPI EEPROM Library C Code
- initSPI
- SPI_tradeByte
- Convenience Functions
- Summary
- Chapter 17. I2C
- How I2C Works
- I2C Demo Hookup
- I2C Demo Library
- I2C Thermometer Demo
- SPI and I2C Data Logger
- Pointers in EEPROM
- The UART Serial Menu
- The Logger's Event Loop
- Chapter 18. Using Flash Program Memory
- Using Flash Program Memory
- Memory Addresses
- The Address-Of Operator: &
- Pointers
- Pointers in Brief
- Pointers as Arguments to Functions
- Summary
- Optional: Dereferencing Pointers
- Talking Voltmeter
- PROGMEM Data Structures and the Header File
- Sound Playback and Voltage Reading: The .c File
- Generating the Audio Data
- Differential Pulse-Code Modulation
- Encoding Two-bit DPCM
- Encoding DPCM: wave2DPCM.py
- Chapter 19. EEPROM
- Using EEPROM
- Storing in Memory
- Reading from Memory
- Saving and Loading EEPROM
- Organizing Data in EEPROM
- Project: Vigenère Cipher Encoder/Decoder
- Chapter 20. Conclusion, Parting Words, and Encouragement
- Learning AVR: The Missing Chapters
- The Watchdog Timer
- Power Savings
- Crystals and Alternate Clock Sources
- Bootloaders
- Analog Comparator
- Debugging
- Put This Book Down and Build!
- Index
- About the Author
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.