Synchronous 3-Bit JK Flip-Flop Counter

Discussion in 'Homework Help' started by ublu32, Aug 21, 2010.

  1. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    Hi,
    I'm studying for exams soon and trying to do the following question;
    Design a synchronous circuit using JK F/F to produce 0,3,5,6,1,7,4,2,0...(Binary)

    My knowledge of this course is very basic I'm afraid so I'd appreciate any help I can get! I'm confused as to whether just flip-flops and AND gates is enough? Can somebody give me an idea of where to start or what I need to do, I'm really confused...! :(

    Thanks guys!
     
    #1
  2. beenthere

    beenthere Retired Moderator

    Joined:
    Apr 20, 2004
    15,815
    272
    Grab a data sheet for a 74LS161. That's a 4 bit synchronous counter with JK's inside. That will show how to make a counter.
     
    #2
  3. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    Ok, I've tried to figure this out and come up with this kind of circuit, but I'm not sure its right? Hopefully I'm on the right track though, could domebody have a look and let me know where I'm going wrong, obv the flip flops would all be connected to a clock, I just havent drawn it in....?
     
    • JK.jpg
      JK.jpg
      File size:
      48.9 KB
      Views:
      184
    #3
  4. Georacer

    Georacer Moderator

    Joined:
    Nov 25, 2009
    5,132
    1,246
    Please be more careful with what you write. If I'm correct you don't need a counter (0,1,2,3...) but a layout that will go through the sequence you mentioned (0,3,5,6,1,7,4,2), am I right? Do you have access to the textboot "Digital Design" of M. Mano? It will help a lot. Do you have any experience with FSM's (Finite State Machines)
     
    #4
  5. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    My apologies, I assumed that as it is counting but up and down it was a counter! As I said, my knowledge is pretty basic. This is a module which I must pass to get into my final year of a mechanical eng. degree. I missed most of this module due to illness so I'm struggling with this repeat exam as I'm pretty much on my own! I'm afraid I don't have access to this book at the minute, unless its available online perhaps?
     
    #5
  6. Georacer

    Georacer Moderator

    Joined:
    Nov 25, 2009
    5,132
    1,246
    Let's start from the basics. You have numbers that reach up to 7, so you need 3 flip flops.
    1. Build a table that will have the following columns: The first will be named "Current State". Fill it will all the binary numbers from 0 to 7. This column will be divided in three, one digit for each flip flop.
    2. Next, create a column wich will be naded "Next State". Fill it with the binary number wich is next in your sequence, after the number in the same row in the previous column. Again, separate the digits to correspond to a flip flop.
    What you have now is for each flip flop a table that describes all the previous states and all the next states.
    3. Create another 6 columns, 2 for each ff. These will correspond to the J and K inputs. Fill them adequately so that from the "previous" column, you get the "next" column. Don't forget to use "X" (Don't care) terms. For example, for the FF1, if your "previous" state is 0 and you want to drive it to 1 you want J,K to be 1,X.
    What you have now is essentially 6 truth tables, 2 for each FF, one for each input. These truth tables have 3 inputs, the current state of the FF's (the number you are at).
    4. The logic function and the corresponding gate circuit you will extract, will then be inserted before each J and K terminal of the FF's to give you the complete circuit.
    I am googling for a ready-made table as an example but still no luck.
    Do you understand everything? Are you stuck at any step?
     
    #6
  7. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    Thank you very much Georacer for your reply! This has cleared it up a great deal for. Before, for the present state i was starting from 0 and going down along the sequence, then had the next state as the following number in the sequence, which now appears to be wrong! I shall try it again, and maybe quickly post my attempt!
     
    #7
  8. Georacer

    Georacer Moderator

    Joined:
    Nov 25, 2009
    5,132
    1,246
    #8
  9. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    Ok, so trying to stick to your method you gave, I tried it and came up with this, but im not so sure its right?

    Is it correct to go from P/S of lets say 000 to N/S 011 to give me 3, and then revert to P/S 001 to N/S 101 to give me 5 in the sequence? :-/

    sorry, i know I must be greatly annoying! Really appreciate the help!

    P.S - I also think J1 should be Q2'Q3 + Q2Q3'
     
    Last edited: Aug 22, 2010
    #9
  10. Georacer

    Georacer Moderator

    Joined:
    Nov 25, 2009
    5,132
    1,246
    I'm afraid it's not correct yet. For example in row #4 right to the binary 2, according to your sequence you need to place number 0 not 5.
    Also be careful on how you fill a Carnot map. The correct way for a 3-variable table is shown in the attachment I include.
    Study a little more on the Carnot Maps. This knowledge is never waisted.
     
    #10
  11. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    Sorry, I dont quite understand what you mean about row number 4 needing to be 0? If the sequence begins 0,3,5..... Can i not make it go from 0 -3, and then the next number 5, as in row 4?:confused:

    Also, without regard to the Karnaugh map, I had arranged them as Q1Q2/Q3 i.e Q1Q2 goin horizontally, as opposed to your example with BC going horizontally. I think this is still correct?
     
    Last edited: Aug 22, 2010
    #11
  12. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    Hello again!!

    ok, I think i may have figured it out?! ive just attached what I've done so far, maybe you could have a quick look? Then if its right, hopefully it could be useful for someone else, althought I doubt anybody else would struggle with this....!! :p
     
    #12
  13. Georacer

    Georacer Moderator

    Joined:
    Nov 25, 2009
    5,132
    1,246
    The correct excitation table is attached. Study it and see where you went wrong.
    The order you fill the Carnot Map is important. Follow the pattern given and replace A,B,C with Q1, Q2, Q3.
    Extract the logic functions for the FF inputs and post them to compare results.
     
    #13
    ublu32 likes this.
  14. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    Cheers GeoRacer!! I just about managed to figure it out. Your a lifesaver, thanks a million for your help!! I'll buy you a pint next time your in Ireland :D
     
    #14
  15. Georacer

    Georacer Moderator

    Joined:
    Nov 25, 2009
    5,132
    1,246
    A pint! :eek: And an Irish one too? Should help people more often ;)
     
    #15
  16. ublu32

    ublu32 Thread Starter New Member

    Joined:
    Aug 21, 2010
    9
    0
    a whole pint! i am a student after all :p i may possible be needing a lot of help, i could end up owing you quite a few pints!! :)
     
    #16
Loading...