I usually forget bitwise operators, basic variables, and functions when coding in Atmel Studio for an ATtiny or ATmega project.
Normally, I look at some of my old code for reference. This is my focused and consolidated version of the important building blocks.
Contents I/O Registers Bitwise Operators Delays Interrupts Program Memory PWM I/O Registers DDRx - Data Direction Register - Configures each pin as an input or output. The 0th bit refers to the 0th pin of the port and the 7th bit refers to the 7th bit of the port. PORTx - Data Register - The value of the pin, used for reading input or writing output Pxn - The nth bit of port x. PB0 refers to the 0th bit of port B and PE7 refers to the 7th bit of port E. x - letter (e.g. B, D, E, F, G) n - number (0, 1, 2, … 7) Note that you still should refer to the datasheet for the specifics on these registers and how to set their values.
...