I have a myRIO from NI. I use the FPGA to generate a sine and a cosine digitally for signal processing of a photo acoustical signal. The sine and cosine have the same frequency. I now want to output the sine over the 12 bit DAC and transform it into a square wave with the exact same frequency and 50% duty cycle. The maximum output rate is 345kSPS and the sine has a 5Vpp amplitude (0V to 5V). The square wave can have a high level between 3.33V and 5V, the low level should be 0V with a duty cycle of 50% to control a laser switch. The output Frequency can vary between 1kHz and 35kHz. That is why I also want to implement a low pass filter before the sine enters the Schmitt-Trigger. The picture shows my try in LTSpice, but although I use this calculator to get the right component values, I only have a DC signal after the LPF. If I try it without the LPF the output of the Schmitt-Trigger has no 50 duty cycle and the high voltage level is too low. Maybe the comparator is no good choice. I hope you can help me on that.
With LPF (LTC6244HV is uesd from LTSPice) I get this result: Any comments on the picture and on the low pass filter?