AVR Notes

From Laen
Jump to: navigation, search

Contents

I/O

Setting a pin to "output"

DDRB |= _BV(PB3);

(Where "B" is the port number, and PB3 matches pin "PB3" on your datasheet.


Setting a pin high

PORTB &= ~_BV(PB3)

Setting a pin low

PORTB|=_BV(PB3)

Programming

The protocol for High Voltage Serial Programming is different from the normal SPI programming. You can't just hook 12V to RESET and hope it works.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox