Square wave generator and frequency meter

Sorry, just 180°. I can't think of a way to get the AVR timer hardware to generate a quadrature signal without interrupts and software.