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.
A filter with a cut-off frequency higher than you clock frequency * 10, or so. In order to have a square wave, you need to retain several of the odd harmonics (squarewave is an odd function, thus consisting of only odd-numbered harmonics... 1st, 3rd, 5th, 7th, etc).
If your fundamental clock frequency is 1 MHz, then you should make a low-pass filter with a cutoff > 10 MHz.
A better way would be to run your signal into a spectrum analyzer or turn on FFT on your oscilloscope (or do it in a tool like Matlab, for post-processing). Run a quick FFT in Matlab, or find a webpage, and determine what relative magnitude your odd harmonics should have from the fundamental frequency in a perfect square wave. Once you run your signal through a filter, you want to retain those relative levels, otherwise you begin to distort the square-ness of the square wave. It'll probably take some trial and error, but using Matlab might help you to make some filters digitally, run it over the data and see how it looks afterwards. Then you can quickly change the filter performance and re-simulate quickly. Just some thoughts on how to do some quick trials before building real filters with hardware.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.