Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SquareWave in C language

Status
Not open for further replies.

underscore

Newbie level 2
Newbie level 2
Joined
Apr 16, 2020
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
24
Hi,

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]

Thanks.
 

I want to write a c code for square wave converter

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.
 

Hi,

Confusing. please clarify:

1) you have an analog sine wave signal....how do you connect it to the FPGA?

2) and you say you have an FPGA ... and you want C code. Usually for an FPGA one uses HDL wihile a microcontroller uses "C"


Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top