Member Since: May 7, 2016

Country: United States

  • I think this is a great video introducing the idea of hardware registers. However, I think that one thing that may make coding easier after learning about bit-shifting is the predefined names for a pin. Another thing that I think makes the code more readable is using the compound operators to do bitwise logic. Instead of using PORTD = (1 << 5) | PORTD; I think using PORTD |= (1 << PD5); would be more readable and it gives a more intuitive way to think about how setting a bit in a register directly affects the output.

    I also think a great book for people who want to know more about this topic is Make: AVR Programming, by Elliot Williams, and can be purchased here. This is how I learned to directly program AVRs without Arduino, and I think that this book is fairly straightforward in explaining everything, starting out with blinking an LED to more advanced projects that use SPI, I2C, and motors.