An update to the Atmel AVR314 Application Note Original Application Note can be found here: http://ww1.microchip.com/downloads/en/AppNotes/doc1982.pdf
I do not take credit for the original software. The original software was taken from the Microchip website and ported for use on th Arduino / ATmega328P.
Please feel free to contribute.