Iv never used the MCU to do multitasking in c code that will compare two voltages...use PLL to compare for 60Hz, and also use the input capture pin for square wave comparison between two signals coming from a schmitt buffer circuit....
Im just not sure how itl do all that at once...
but yes, the idea of software comparing the voltages is good idea. just gota still have a circuit to step down the voltage and offset it.
I was thinking of just havening a comparing circuits too..
I have componenets like LM741, rectifier bridge IC, 2of (120 to 10 or 5V) PT's, the lm311 comparator, and even the quad....someother components too...DAC08 w/74ls324/74...MPF102 I think and the IRFZ20 for waveform signal...(regarding that, can 120V go in to Gate, 5V to Drain and pull up resistor 1K form Source to ground, source going to I/P Capture.?)...
i provided a circuit from first post that supposably did a voltage comparing..but didnt seem it it did too well for me when tried it.