Discussion in 'Electronic Design' started by Jim Weir, Nov 15, 2003.

1. ### Jim WeirGuest

I know I've got this technique around here somewhere, but I've just spent two
hours going through the files and another two hours on the 'net and have come up
dry.

Seems to me I remember a pretty nifty way (with xor gates, as I recall) of
making two square waves in quadrature with another. Seems that you took a
binary multiple of the frequency you wanted and gated/flipflopped your way down
to the desired fundamental.

That is, if you want two 1 kHz. square waves in quadrature, you start off with
either a 2 kHz. or 4 kHz. square wave and mogrify those.

Anybody got a clue where I can start looking for this circuit?

Jim

2. ### John LarkinGuest

Given clock at 2f, and two d-flops. Set up the first flop to divide by
2; second flop follows the output of first one, but clcok it on the
opposite clock edge.

ta/dah.

John

3. ### Roger HamlettGuest

The normal way, is to feed the signal into one input of one XOR gate, and
both inputs of the other. The output of this gate is then fed to the other
input of the second gate. The output of this gate becomes a 'signal changed'
pulse. This can then be fed into flip-flops to give the required square
waves.
I don't think you can do it with just two XOR gates, you need the flip-flop
as well.

Best Wishes

4. ### Jim WeirGuest

I'm a slow student. I don't understand "follow". And do you mean clock the
second flop with a phase inverted clock?

Thanks for responding.

Jim

John Larkin <>
shared these priceless pearls of wisdom:

->Given clock at 2f, and two d-flops. Set up the first flop to divide by
->2; second flop follows the output of first one, but clcok it on the
->opposite clock edge.

5. ### Don TaylorGuest

I REALLY hope this isn't a homework problem.

Re-invent the wheel:

___
___| |
___
_| |__

4 states -> 2 bit counter.

arbitrarily assign count<->states, hope for the best.

counter states
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0

K map it. <details omitted> Reduce it <details omitted>

Result, one of the bits of your 2 bit counter is one of your
quadrature signals, the xor of the two counter bits is the

It has been WAY too many years since I've done this,
please check the results carefully. But actually, once the
answer has been presented I think you can look at the
list of counter<->states and see that works.
A skill sort of like working crossword puzzles.

6. ### John LarkinGuest

clk---------ck \q-----+ \clk------ck \q
|
+--d q --- | --------+--------d q----------- out2
| | |
+--------------+ +------------------------- out1

So out1 is a square wave at frequency clk/2. Out2 follows out1 but is
delayed 1/2 of the clk time = 1/4 of out1 period = 90 degrees.

Make \clk by inverting clk, or by using a third ff to divide a 4x
clock into two phases.

John

7. ### John FieldsGuest

---

+----------------->I
+-----------|------------+
| +-----+ | +-----+ |
+--|D Q|--+--|D Q|-------->Q
| | | | |
4f>---+--|> |--+--|> | |
| | | | | Q-|O--+
| +-----+ | +-----+
+-----------+

_ _ _ _ _ _ _
4f __| |_| |_| |_| |_| |_| |_| |_|

_______ _______
I __| |_______| |____

_______ ________
Q ______| |_______|

8. ### Jim WeirGuest

Jim Weir <>
shared these priceless pearls of wisdom:

I know you all mean well, but I truly hope that none of you are teachers.
Thanks for all your well-intentioned help, but I'll figure it out for myself or
find the ancient notes.

ASCII undecipherable diagrams take an immense amount of your time to generate
and I'm sorry for wasting your time.

Jim

9. ### James MeyerGuest

Sorry you feel that way Jim. The ASCII diagrams are quicker to do than
to write a word description that contains as much information. I truly feel bad
for anyone trying to teach you anything.

None of the diagrams were undecipherable here. You aren't blind, are
you? If you had a text-to-speach utility for "reading" the messages, I could
see the "undecipherable" part. I saw a message once that told a blind guy to
"RTFM". 8-(

For every original requester who goes away unfulfilled, there are at
least 10 lurkers who get a great deal out of reading the answers. So your
question and the answers are valuable even if you don't think so.

Jim

10. ### John WoodgateGuest

They aren't indecipherable if you use Courier font. Consider that no-one
would use them if they were as useless as you claim.

11. ### Helmut SennewaldGuest

Hello Jim,
there is a small type error in John Fields circuit. I have
corrected it for you. This circuit has been successfully tested
with a simulator(LTSPICE) by myself. If you can't clearly see
the schematic, then your news reader isn't set to a fixed font.
There should be a setting like "text only" or "x plain text".
I can send you the schematic as picture(.jpg), if you are interested.
The advantage of this circuit is that the outputs I and Q are
exactly 90 degree out of phase regardless of the duty cycle of the
incoming clock. The incoming clock clock frequency has to be four
times the output frequency with this circuit.
The two D-Flipflops are available in one 74HC74, 74HCT74 package
or something equivalent from other logic families like AC, ACT, ALV ... .
Better thank John for taking the time to draw a clear schematic.
We like to say: "One picture shows(tells) more than thousand words".

There are two ASCII schematic editors around too. They are helpful
especially for larger circuits.
http://www.tech-chat.de/ AACircuit V1.24
http://www.fidalgo.net/~garyr/pyascii/ pyASCII

Best Regards
Helmut

John Fields corrected circuit.

+----------------->I
+-----------|------------+
| +-----+ | +-----+ |
+--|D Q|--+--|D Q|-------->Q
| | | | |
4f>---+--|> | +--|> | |
| | | | | Q-|O--+
| +-----+ | +-----+
+-----------+

_ _ _ _ _ _ _
4f __| |_| |_| |_| |_| |_| |_| |_|

_______ _______
I __| |_______| |____

_______ ________
Q ______| |_______|

12. ### JeffMGuest

ASCII undecipherable diagrams
Should you decide against best advice
another way to view ASCII art is to cut the text
and paste it into a monospaced text editor (Notepad).
(I'm assuming you use Windoze.
Forte Agent is available for Windows and Linux.)

13. ### petrus bitbyterGuest

Jim,

I'm not a teacher anymore but when I still was one I'd say: "Jimmy, JImmy.
Do a little thinking before you complain. Use that little grey cells hidden
behind your eyes. You've got them to use them. Those man that wrote this
replies are skilled techs and engineers. Do you really think they use
undecipherable ASCII's? The answers they give you are the ancient solutions
of an similar old problem. The only thing you have to do is using a fixed

petrus

14. ### Gary RichardsonGuest

generate
[snip]

Not if you use the right tool: