Another small question if I may...
I want to take an audio signal into a zero-crossing detector, i.e. to signal condition the drive (from an MP3 player typically) then to feed into a ZCS detector using an ATmega which I will use to generate a square wave with leading edge on the -ve -> +ve input transition, and the trailing edge on the +ve -> -ve input transition.
I was wondering if companding the input would be worth while?
Can anyone suggest suitable approaches - the obvious one is to use the comparator, but I was wondering if there are any other approaches I should look at.