AVR®: Read an I/O as an Input to Turn on an LED
In this video:
- Set up macros to make code more readable.
- Poll the status of the GPIO connected to the switch.
- Debug in Atmel Studio using the I/O view, seeing bits in the PIN, DDRB and PORTB registers change as we single step through the code.
Hands-On Training
Application Note - AN17644: Getting Started with AVR® Microcontroller