AVR Workshop Cover

AVR Workshop

A Hands-On Introduction with 60 Projects
by John Boxall
September 2022, 376 pp.
ISBN-13: 
9781718502581

Look Inside!

AVR Workshop pp 4-5 AVR Workshop pp 32-33 AVR Workshop pp 118-119 AVR Workshop pp 144-145AVR Workshop back cover

Download Chapter 8: CONTROLLING MOTORS WITH MOSFETS

AVR Workshop is a comprehensive introduction to working with the versatile Microchip AVR 8-bit microcontrollers that form the core of Arduino and compatible boards. Whether you’re an absolute beginner or electronics enthusiast, the book’s 60 projects will teach you how to build your own AVR devices, one step at a time.

You’ll learn the C programming skills needed to work directly with the inexpensive ATmega328P-PU and ATtiny85 microcontrollers. You’ll review the core properties of current, voltage, and power; learn to safely work with USBasp programmers and breadboards; and follow schematics to construct circuits. You’ll control digital output with bitwise arithmetic, take user input with pushbuttons and analog-to-digital converters, and test the voltage of a single-cell battery.

As you make your way through the book, you’ll build fun and useful devices like these:

  • An LED display with changing colors and brightness

  • A four-function calculator that connects an AVR to your computer

  • A temperature-controlled fan and a two-wheel-drive robot vehicle 

  • A real-time digital clock that charts the date and time on an LCD

You’ll also learn more advanced skills like how to:

  • Control motors with pulse-width modulation and MOSFETs

  • Work with parts like LCDs, servos, and interface chips, and write your own AVR libraries

  • Implement the SPI and I2C buses with AVR

  • Use hardware interrupts, timers, and EEPROM

By the end of the book, you’ll have learned to harness a wide range of sensors, motors, displays, and more with the AVR microcontroller so you can bring your own inventions to life.

Requirements: ATmega328P-PU and ATtiny85 microcontrollers and USBasp programmers. Projects may require other inexpensive parts.

 

Author Bio 

John Boxall has been an electronics enthusiast for over 30 years, spending much of that time in the retail, wholesale, and consulting fields. He also spent several years writing Arduino tutorials, designing projects, and reviewing kits and accessories at www.tronixstuff.com. Arduino Workshop (No Starch Press) was his first book.

Table of contents 

Chapter 1: Getting Started
Chapter 2: First Steps
Chapter 3: Getting Input
Chapter 4: Communicating with the Outside World
Chapter 5: Taking Control with Hardware Interrupts
Chapter 6: Timing with Hardware Timers
Chapter 7: PWM
Chapter 8: Motors
Chapter 9: EEPROM
Chapter 10: Libraries
Chapter 11: SPI Bus
Chapter 12: I2C Bus
Chapter 13: LCD
Chapter 14: Servos

Extra Stuff 

Click here to download the book's code.

Click here to download the book's parts list.