I have drawn a flowchart for this, i think this can make things clear. Btw, in flowchart hold untill ... means output will be same untill ... happens.Sorry but that's not clear at all.
You may be able to use a latch to do the switching but if you can't post a logic table of exactly what signals or signal sequence cause what SR frequency, I can't help you any further.![]()

Last edited: