complete functionality of atmega_328p. could use some basic code cleanup but it works.