I want to write a c code for square wave converter for some calculation purposes, Actually have to do some process [ converting an analogue signal to a square wave ]. I don't have any idea about this logic in c language .
Pls anyone suggest me the logic or code for square wave converter in C . [currently working with FPGA]
Correct me if I got it wrong, but what you want is not merely to generate a toggle and redirect to an output? Is the frequency fixed or variable? By the way, not mentioning what compiler, or what hardware platform you are using, the question is somewhat vague.
Hi,
Thanks for the replaying
Actually, I have already an analog sine wave signal and for calculation purposes just wanted to that sine wave signal into a square wave in C code.
I'm using the kintex series 7 FPGA board.
And right now for c code, I'm doing on an online compiler.
..
Could you please suggest to me..even if simple logic in C language for a square wave. Actually, I'm my field is electrical engineering that's why I'm facing a problem with this.