Build more than 55 hands-on, wide-ranging projects with the popular and versatile AVR family of microcontrollers.
AVR Workshop is a comprehensive introduction to working with the Microchip AVR 8-bit family of microcontrollers – made famous through their use in Arduino and other compatible boards. Whether you’re an absolute beginner or longtime electronics enthusiast, this book gives you the latest coding and hardware knowledge required to build over 55 projects. After the author guides you through the basic C programming skills you need to work directly with ATmega328P-PU and ATtiny85 microcontrollers, your operation will be up and running. You’ll go from building blinking LEDs and handling various types of user input, to creating real-time clocks, digital thermometers, and even controlling small motorized devices.
Cover Title Page Copyright Page Dedication About the Author Brief Contents Contents in Detail Acknowledgments Introduction 1: Getting Started The Possibilities Are Endless The Microchip AVR Microcontrollers Required Parts and Accessories Electronic Components Choosing an AVR Programmer Required Software macOS 10.6 or Later Ubuntu Linux 20.04 LTS or Later Windows 7 Through 11 Current, Voltage, and Power Electronic Components Resistors Light-Emitting Diodes Power Diodes Capacitors Integrated Circuits Solderless Breadboards Powering Your Projects 2: First Steps Testing the Hardware and Toolchain Build the Circuit Connect and Run the Programmer What If It Didn’t Work? Project 0: Blinking an LED Uploading Your First AVR Code What If It Didn’t Work? Controlling Digital Outputs Hardware Registers Project 1: Experimenting with ATtiny85 Digital Outputs The Hardware The Code Using Schematic Diagrams Components in Schematics Wires in Schematics Dissecting a Schematic Project 2: Experimenting with ATmega328P-PU Digital Outputs The Hardware The Code Project 3: Bit-Shifting Digital Outputs Project 4: Experimenting with NOT Project 5: Experimenting with AND Project 6: Experimenting with OR Project 7: Experimenting with XOR 3: Getting and Displaying Input Digital Inputs Introducing the Pushbutton Reading the Status of Digital Input Pins Project 8: Blinking an LED on Command The Hardware The Code Making Decisions in Code if Statements if . . . else Statements Making Two or More Comparisons switch . . . case Statements Creating Your Own Functions Project 9: A Simple Custom Function Project 10: Custom Functions with Internal Variables Project 11: Custom Functions That Return Values Switch Bounce Protecting Your AVR from Fluctuating Voltages Pullup Resistors Pulldown Resistors Introducing Seven-Segment LED Displays Project 12: Building a Single-Digit Numerical Counter The Hardware The Code Analog Inputs Using ATtiny85 ADCs Project 13: Making a Single-Cell Battery Tester The Hardware The Code Using the ATmega328P-PU ADCs Introducing the Variable Resistor Project 14: Experimenting with an ATmega328P-PU ADC The Hardware The Code Doing Arithmetic with an AVR Using External Power The TMP36 Temperature Sensor Project 15: Creating a Digital Thermometer The Hardware The Code 4: Communicating with the Outside World using the USART Introducing the USART Hardware and Software for USART Communication Project 16: Testing the USART The Hardware The Code Project 17: Sending Text with the USART Project 18: Sending Numbers with the USART Project 19: Creating a Temperature Data Logger The Hardware The Code Project 20: Receiving Data from Your Computer Project 21: Building a Four-Function Calculator 5: Taking Control with Hardware Interrupts External Interrupts Setting Up Interrupts in Code Project 22: Experimenting with Rising Edge Interrupts The Hardware The Code Project 23: Experimenting with Falling Edge Interrupts The Hardware The Code Project 24: Experimenting with Two Interrupts The Hardware The Code Pin-Change Interrupts Project 25: Experimenting with Pin-Change Interrupts The Hardware The Code Project 26: Creating an Up/Down Counter Using Interrupts The Hardware The Code Final Notes on Interrupts 6: Using Hardware Timers Introducing Timers Project 27: Experimenting with Timer Overflow and Interrupts The Hardware The Code Project 28: Using a CTC Timer for Repetitive Actions Project 29: Using CTC Timers for Repetitive Actions with Longer Delays Examining the Accuracy of the Internal Timer Addressing Registers with Bitwise Operations Addressing Individual Bits in a Register Addressing Multiple Bits in a Register Project 30: Experimenting with Overflow Timers Using Bitwise Operations 7: Using Pulse-Width Modulation Pulse-Width Modulation and Duty Cycles Project 31: Demonstrating PWM with the ATtiny85 The Hardware The Code Individual PWM Pin Control for the ATtiny85 Project 32: Experimenting with Piezo and PWM The Hardware The Code Individual PWM Pin Control for the ATmega328P-PU The RGB LED Project 33: Experimenting with RGB LEDs and PWM The Hardware 8: Controlling Motors with Mosfets The MOSFET Project 34: DC Motor Control with PWM and MOSFET The Hardware The Code Project 35: Temperature-Controlled Fan The Hardware The Code The L293D Motor Driver IC Project 36: DC Motor Control with L293D The Hardware The Code Project 37: Controlling a Two-Wheel-Drive Robot Vehicle The Hardware The Code 9: Using the Internal EEPROM Storing Bytes in EEPROM Project 38: Experimenting with the ATtiny85’s EEPROM Storing Words Project 39: A Simple EEPROM Datalogger The Hardware The Code Storing Floating-Point Variables Project 40: Temperature Logger with EEPROM The Hardware 10: Writing Your Own AVR Libraries Creating Your First Library Anatomy of a Library Installing the Library Project 41: Your First Library Creating a Library That Accepts Values to Perform a Function Project 42: Using the blinko2.c Library Creating a Library That Processes Data and Returns Values Project 43: Creating a Digital Thermometer with the thermometer.c Library 11: AVR and the SPI Bus How Buses Work Pin Connections and Voltages Implementing the SPI Bus Sending Data Project 44: Using the 74HC595 Shift Register The Hardware The Code Project 45: Using Two 74HC595 Shift Registers The Hardware The Code Project 46: Using the MAX7219 LED Driver IC The Hardware The Code Project 47: Adding a Reset Button Multiple SPI Devices on the Same Bus Receiving Data from the SPI Bus Project 48: Using the MCP3008 ADC IC The Hardware The Code 12: AVR and the I2C Bus Increasing AVR Speed Introducing the I2C Bus Pin Connections and Voltages Writing to I2C Devices Project 49: Using the MCP23017 16-Bit I/O Expander The Hardware The Code Reading Data from I2C Devices Project 50: Using an External IC EEPROM The Hardware The Code Project 51: Using the DS3231 Real-Time Clock The Hardware The Code 13: AVR and Character Liquid Crystal Displays Introducing LCDs Send Commands to the LCD Initialize the LCD for Use Clear the LCD Set the Cursor Print to the LCD Project 52: Using a Character LCD with Your AVR The Hardware The Code Project 53: Building an AVR-Based LCD Digital Clock The Hardware The Code Displaying Floating-Point Numbers on the LCD Project 54: LCD Digital Thermometer with Min/Max Display The Hardware The Code Displaying Custom Characters on the LCD Write Data to CGRAM Send Custom Character Data to LCD Display Custom Characters on LCD Project 55: Displaying Custom LCD Characters 14: Controlling Servos Setting Up Your Servo Connecting a Servo Controlling a Servo Project 56: Experimenting with Servos The Hardware The Code Project 57: Creating an Analog Thermometer The Hardware The Code Project 58: Controlling Two Servos The Hardware The Code Project 59: Building an Analog Clock with Servo Hands The Hardware The Code Epilogue Index
How to download source code?
1. Go to:
2. Search the book title:
AVR Workshop: A Hands-On Introduction with 60 Projects, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Download the Source Code.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.