+ Post New Thread
Results 1 to 10 of 10
-
28th October 2019, 10:51 #1
- Join Date
- Oct 2019
- Posts
- 8
- Helped
- 0 / 0
- Points
- 55
- Level
- 1
filtering a output of xor-ed signal
Hello ,
I have two signal yellow and green which i'm doing an xor operation with both and now i get blue signal as an output but the problem is it has a spikes as you can see in every half period. could someone help me in removing that or any ideas?
P.S i'm just playing with gates and i wanted to see if the online simulation and theoretical results matches with my hardware setup which aren't matching. And here the BLUE signal is my final output
thank you
-
28th October 2019, 14:39 #2
- Join Date
- Mar 2005
- Location
- California, USA
- Posts
- 4,704
- Helped
- 1038 / 1038
- Points
- 24,502
- Level
- 38
Re: filtering a output of xor-ed signal
You have discovered the reason for using synchronous (clocked ) signals. When you have both signals transitioning simultaneously, there will be points in time where they are both interpreted as ‘ones’ or ‘ zeroes’ generating those glitches you see. Your circuit is working exactly as it should, although not like you want.
-
Advertisement
-
28th October 2019, 17:37 #3
- Join Date
- Oct 2019
- Posts
- 8
- Helped
- 0 / 0
- Points
- 55
- Level
- 1
Re: filtering a output of xor-ed signal
Yeah. Do you have any idea of removing that glitches as now my frequency is changed because of glitches!
Thank you
-
28th October 2019, 17:46 #4
- Join Date
- Sep 2013
- Location
- USA
- Posts
- 7,381
- Helped
- 1731 / 1731
- Points
- 31,889
- Level
- 43
Re: filtering a output of xor-ed signal
-
Advertisement
-
28th October 2019, 17:50 #5
- Join Date
- Mar 2005
- Location
- California, USA
- Posts
- 4,704
- Helped
- 1038 / 1038
- Points
- 24,502
- Level
- 38
Re: filtering a output of xor-ed signal
Depending on your design, those glitches may not be a problem at all. Or they may. You don't tell us anything about your design other than there's an XOR in it.
-
28th October 2019, 17:56 #6
- Join Date
- Sep 2013
- Location
- USA
- Posts
- 7,381
- Helped
- 1731 / 1731
- Points
- 31,889
- Level
- 43
Re: filtering a output of xor-ed signal
They just did tell us, they are using the output as a clock. You can see it is a 90 degree phase shifted version of the yellow clock. Though they would be better off using a D-Flip-flop and a inverter to clock the yellow data through the flip-flop using the falling edge of the green clock, which would then produce a "clean" (registered) blue clock.
-
28th October 2019, 18:26 #7
- Join Date
- Oct 2019
- Posts
- 8
- Helped
- 0 / 0
- Points
- 55
- Level
- 1
-
28th October 2019, 18:46 #8
Awards:
- Join Date
- Apr 2014
- Posts
- 16,064
- Helped
- 3637 / 3637
- Points
- 79,154
- Level
- 68
Re: filtering a output of xor-ed signal
Hi,
I agree with the others.
Maybe a solution: (not nice, but maybe useful)
Low pass filter the output of the XOR with an RC. Tau about 30ns. (maybe with this you can ged rid of the glitches)
Then use a buffer or schmitt trigger to make a clean square wave.
KlausPlease don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.
-
Advertisement
-
28th October 2019, 20:27 #9
- Join Date
- Sep 2013
- Location
- USA
- Posts
- 7,381
- Helped
- 1731 / 1731
- Points
- 31,889
- Level
- 43
Re: filtering a output of xor-ed signal
This is what I mean
Code:_______ _______ _______ _______ clk1 _| |_______| |_______| |_______| ___ ___ ___ ___ ___ ___ ___ clk2 _| |___| |___| |___| |___| |___| |___| |___ ___ ___ ___ ___ ___ ___ ___ xor _|___| | |___|___| | |___|___| | |___|___| gives glitches on every transition _______ _______ _______ __ clko ______| |_______| |_______| |_______| using a D-FF with falling edge clock (the o on the clock is an inverter) _____ | | clk1 ----|D Q|---- clko | | clk2 ---o|> | |_____|
This is an ugly solution that will result in significant duty cycle distortion and latency, but if that doesn't mater then it will work, but will require more components. 1 Resistor, 1 capacitor, and a schmitt trigger buffer. I wouldn't use a regular buffer as the Tau of 30ns is probably still to low to filter out all the runt pulses to not have them get seen by a regular buffer. The schmitt trigger will allow you to turn the xor output into a sine wave before converting back to a clock, but this design will have a large amount of variable latency that will change over voltage, temperature, and components.
If what you are clocking doesn't care about the quality of your clock then go ahead and try the RC filter method. If you have a handy D-FF with negative edge clock input then the way I suggest will give you a far better result.
1 members found this post helpful.
-
29th October 2019, 12:19 #10
- Join Date
- Oct 2019
- Posts
- 8
- Helped
- 0 / 0
- Points
- 55
- Level
- 1
Re: filtering a output of xor-ed signal
thanq u so much. will try in hardware!
+ Post New Thread
Please login