This is my first post here. I am facing the problem with level shifting circuit which is later the input for the ADC of the microcontroller. As far as the sine and triangle waves concern circuit is doing well within 100KHz thats what the project requirement but the square wave is causing the actual problem with output like a pid curve. The same problem is occuring both on the hardware and the simulation side. I also tried different opamps like tl081, lm358, lm324 and CA3130 but all of them give some sort of distortion.
Attached is the circuit diagram and output of square waveform. Any help would be appreciated.
Thanks in advance :)