THere it is. I need a state machine using JK flip flops that will count through that sequence.
is it even possible?
Ive been busting my brain for a long time and CANNOT do it.
sam fakhreddine
THere it is. I need a state machine using JK flip flops that will count through that sequence.
is it even possible?
Ive been busting my brain for a long time and CANNOT do it.
sam fakhreddine
With study, all things are possible. Why JK flipflops? Nobody uses them out of choice, at least not knowingly. They might be there in the PLD, but leave the compiler to sort that out.
If, for some reason, you HAVE to do it that way, write down, for each bit, a Karnaugh map showing the next action (set 1, set 0, toggle, stay the same: you probably only need toggle and hold) for each bit, then convert that to logic, no doubt using only 2 input NAND gates.
Or just use an n-bit counter (bits appropriate for the number of states) and a LUT.
Oh, I haven't read the sequence. If there's a trick there, you might have to add an extra flipflop.
Paul Burke
snipped-for-privacy@gmail.com wrote: : 0110 : 0010 : 1010 : 1110 : 1111 : 1011 : 1001 : 1101
: THere it is. I need a state machine using JK flip flops that will count : through that sequence. Looks like some sort of gray code, i.e. for each step only one bit changes. If it is possible to do use only JK flip flops and no gates to implement, you could prove using karnaugh diagrams as somebody else already wrote. If I had to build such a counter, I'd use a combination of a 4bit counter and a multiplexor.
Yes it is possible, I did something similar as a University project several years ago but with a more complicated sequence. Your application sounds like a similar Uni project so I will reply as if it was so, if not please clarify your application further. You have a sequence of 8 states of 4-bit numbers, this is called modulo-8. 4-bit binary numers naturally repeat after 2^4=16 sequences i.e. 0000,
0001...1110, 1111, then loop back to 0000 i.e. modulo-16. Four J-K flip-flops will generate this for you, look up the circuit in a search engine or digital book. You need to reset the FF's after 8 states to change it to modulo-8, you do this by generating a RESET* when the output reaches 0111 (dec 7), this can be achieved by using 1 NOT and 2 AND gates feeding into the RST* input of each FF. (If it is active low, use another NOT gate to invert), 0000, 0001...0110, 0111 then loop back to 0000, now you have a modulo-8 state machine. The next step is to put your target sequence into a state table and use Karnaugh maps to generate the equations for AND and OR gates. Find more on Karnaugh maps in a book or in a SE, it would take too long to explain here. Minimise the equations and use the appropriate AND, OR, NOT gates etc. to generate your desired sequence. It would be worth your while generating the circuit in a simulator before attempting to build it, it will save at lot of headache.Hope this helps. Alan.
I'm not sure if this is homework, or not. As someone else pointed out, it is a gray code -- though it doesn't cycle through all 16 possibilities, instead only 8 and then back again.
In any case, this suggests the obvious: a 3-bit ripple counter from three JK FFs to start. Once you have that, all you need to do is to generate the Karnaugh maps for each of the output bits. Let's label them A, B, C, and D, in that order as a heading for your list.
: OUTPUTS Counter : A B C D X Y Z : 0 1 1 0 0 0 0 : 0 0 1 0 0 0 1 : 1 0 1 0 0 1 0 : 1 1 1 0 0 1 1 : 1 1 1 1 1 0 0 : 1 0 1 1 1 0 1 : 1 0 0 1 1 1 0 : 1 1 0 1 1 1 1
In that case, we have these maps:
A = x + /x*y \\ xy\\z 0 1 +-----+-----+
00 | 0 | 0 | +-----+-----+ 01 | 1 | 1 | +-----+-----+ 11 | 1 | 1 | +-----+-----+ 10 | 1 | 1 | +-----+-----+B = /y*/z + y*z \\ xy\\z 0 1 +-----+-----+
00 | 1 | 0 | +-----+-----+ 01 | 0 | 1 | +-----+-----+ 11 | 0 | 1 | +-----+-----+ 10 | 1 | 0 | +-----+-----+C = /x + x*/y \\ xy\\z 0 1 +-----+-----+
00 | 1 | 1 | +-----+-----+ 01 | 1 | 1 | +-----+-----+ 11 | 0 | 0 | +-----+-----+ 10 | 1 | 1 | +-----+-----+D = x \\ xy\\z 0 1 +-----+-----+
00 | 0 | 0 | +-----+-----+ 01 | 0 | 0 | +-----+-----+ 11 | 1 | 1 | +-----+-----+ 10 | 1 | 1 | +-----+-----+From the above, you should be able to easily work out the combinatorial logic that would follow the 3-bit counter.
Jon
Use an EPROM
-- Dirk The Consensus:- The political party for the new millenium http://www.theconsensus.org
On Tue, 07 Feb 2006 16:16:51 +0000, Dirk Bruere at Neopax transparently proposed:
"I need a state machine using JK flip flops"
Nah this is not homework, I'm trying ot use a a chip that has 16 options but only want to enable 8 of those options.
I wish it was homework, my classmates could help :)
What's the problem? If you want to do a synchronous circuit, you use 4 JK flip-flops. You then come up with the combinatorial logic to drive the 4 J & 4 K inputs based on the 4 outputs including the output of the FF in question (you also have the 4 inverted outputs available for free). Optimize each term with Karnaugh maps.
If this was a real application, it might be better to drive the K and J inputs individually rather than going for a toggle, so as to make sure it gets out of each of the eight invalid states without a reset.
Best regards, Spehro Pefhany
-- "it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Use JK flip flops as registers and the ROM in the feedback path, or use JKs as a counter and decode using EPROM.
-- Keith
What's the big picture? What are you trying to accomplish? All that you've presented so far is nothing but a homework problem. "I need to generate this pattern, and all I have is J-K flip-flops" - Geez! Nobody's used a J-K flip-flop in like 20 years!
Unless the assignment is to figure out how to use ANDs and ORs and NANDs and NORs to get the J-K's to clock in your given sequence (which sounds like a freakin' nightmare), just use that 3-bit counter and you can decode the Karnaugh map with a diode matrix.
Good Luck! Rich
Why? It this is just some homework problem don't waste my time.
-- Dirk The Consensus:- The political party for the new millenium http://www.theconsensus.org
holy hell.
this isnt a homework problem.
I have a 16 effect reverb chip. I want to only use 8 of these effect, the other 8 are of no use to me.
that is the situation. I am very thankful for most of the replies thus far.
Sure you CAN.
I'm an analog guy, so I restrict myself to D-flops, J-K's are a bit archaic anyway.
But attack your problem thusly (with D-flops)...
To the right of EACH state write down what the D-inputs have to be to get the next state when clocked.
Then figure out the decoding for each D-input as a function of Q1, Q2, Q3, Q4
You CAN do it.
Just a wee bit of grunt work.
I doodled it out on just over a half sheet of paper.
If you give up I will (reluctantly) post it to A.B.S.E, but you'll certainly feel better about it if you do it yourself.
...Jim Thompson
-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | It\'s what you learn, after you know it all, that counts.
If you're going to dumb the problem down...
Then at this address (current state) in a ROM enter the desired next state as data. Connect the Q outputs of the DFFs to the inputs of the ROM and the outputs of the ROM to the D inputs of the DFFs. All done.
Then at all unused address enter one of the above states, just in case. ;-)
Nah, but keep that up and the synthesis shop steward will file a grievance. ;-)
-- Keith
Last time I had a confrontation with a shop steward was when I was a student at MIT (around 45 years ago now)...
Ordered up a 400VDC installation for our lab.
Couple of months go by, still no show of the electricians.
I go down to Building 20 stores and get a bunch of 4/0, and wire it up myself.
Another few months go by and the electrician shows up. I tell him to go away.
Next thing you know I'm called into the RLE (Research Lab for Electronics) main office.
There stands the union steward and the RLE Director.
They try to light into me.
I tell them, "I'm a student, go f... yourself", and walk out.
Never heard another word about it except that Professor Woodson (he was from Texas) laughed so much I thought he was going to be sick ;-)
...Jim Thompson
-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | It\'s what you learn, after you know it all, that counts.
How many more times are you going to bore us by retelling this lame tale?
-- Service to my country? Been there, Done that, and I\'ve got my DD214 to prove it. Member of DAV #85. Michael A. Terrell Central Florida
Wrong answer- the machine can be produced using only JK FFs- no gates required.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.