code from learning AVR C (using AVR-GCC)