logic question-- 2 Clocks, 1 SPDT

An area for asking questions, making suggestion, share ideas and place circuit examples.
Post Reply
JOHNYRADIO
Posts: 2
Joined: Sun Nov 11, 2012 12:34 pm

logic question-- 2 Clocks, 1 SPDT

Post by JOHNYRADIO »

Hello

I've got a SPDT switch, S1.
And a clock C1. Every time the C1 goes High, it should drive S1 high (switch to position 1).
There's a slower clock, C2. When C2 goes High, it should drive S1 low (switch to position 2).
If C1 and C2 go high at the same time, C2 wins.

How to do this?

Thank You.
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: logic question-- 2 Clocks, 1 SPDT

Post by admin »

I am not quite understood what you mean. I guess for starter you need to think about truth table for you circuit.
If I am getting you task correctly you probably have something like:

C1 |C2 | S1
0 | 0 | 0
1 | 0 | 1
0 | 1 | 0
1 | 1 | 0

Then you circuit needs to implement the following logic:
C1 & !C2
JOHNYRADIO
Posts: 2
Joined: Sun Nov 11, 2012 12:34 pm

Re: logic question-- 2 Clocks, 1 SPDT

Post by JOHNYRADIO »

Here's a solution that was suggested to me.
Image

Here's my version of the same circuit. (note, the D's are not part of the solution, they are use to generate C2):
Image

It seems like a great idea. But as you can see from the trace (below), the output is not going high and low as desired. I need Q to go high on the first C1 rise after the first C2 rise, as described in the OP.

another issue with this solution is, i'm seeing rises in the output on C1 falls, which is not desired. All changes should happen only on rising edges....

Image

i have struggled with numerous truth tables, but just cannot get it! One of my truth tables suggests that driving both clocks through an AND gate may be the solution, but i can't get anything working with that either.

:(

any ideas?

thank you!
Post Reply