T-flipflop (logic) tutorial

    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    T-flipflops can be divided into upflank- and downflank-T-flipflops. They change their output whenever an up-/downflank arrives(depending on their type). An upflank is a signal switching from OFF to ON, and a downflank is a signal switching from ON to OFF. Chained T-flipflops can be used for counting.

    • The output OR gate and the ResetRS(AND) gate form an RS-gate, additionally the OR serves as output
    • The activation module serves as input
    • The upflank-filter prevents a too long input signal from turning the RS-gate into an oszillator
    • The ResetDelay(2 DELAY modules) does only serve as a "resistor" to prevent the RS-gate from short circuiting from a single upflank when the block-updates are in wrong order.
    Any feedback is welcome(I know my arrow-drawing skills are bad, no need to write about them).
     
    Last edited:
    Joined
    Jun 21, 2013
    Messages
    350
    Reaction score
    61
    • Legacy Citizen 2
    an example for a use of this would be helpful, I see what it's doing but why?
     
    Joined
    Oct 5, 2013
    Messages
    20
    Reaction score
    2
    Sorry i missmatched the forum and dont know how to delete the message
     
    Last edited:
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    an example for a use of this would be helpful, I see what it's doing but why?
    The most common example(IRL) would be buttons, that enable and disable a device, but don't have to be pressed all the time. I found, that the Area Trigger module behaves in such a way.
    Another good example would be counters(a chain of T-flipflops with the output of one being the input of another). If you build one each T-flipflop stands for a bit.
     
    Joined
    Aug 29, 2013
    Messages
    61
    Reaction score
    14
    Earlier this week I made a bunch of SR and JK Latches before expanding the design to JK Flip-flops. I found it pretty easy to convert my fundamental electronics knowledge into working the logic system, then failed to find a use!
    I could easily build shift registers and the likes but I'm honestly struggling to think of something I'd want to use them for, even my largest ship builds! I can't find a use for basic state/data storage (say, up to 16bit), and even the timer "divide-by-two" uses are limited with the size of the flip-flop until you get up to the 32 second delay region, at which point your again asking "what's the use?"

    From what I've gathered from others the general intent is to have a 'trigger', be that an activation module or what ever, and that trigger kick off one or more actions, such as lighting, doors, grav, weapons, etc. Sure, I could most likely burn a few days and build a calculator akin to but it'll only end up archived and never used again. lol.
     
    Joined
    Aug 14, 2013
    Messages
    2,811
    Reaction score
    960
    • Councillor 3 Gold
    • Wired for Logic
    • Top Forum Contributor
    The easiest T-Flipflop is a string of activators all in a 2 way chain, because they are all linked together they will all toggle regardless of which one you activate.
     
    Joined
    Aug 14, 2013
    Messages
    2,811
    Reaction score
    960
    • Councillor 3 Gold
    • Wired for Logic
    • Top Forum Contributor
    That is NOT what a T-flipflop should do.
    True but in most circumstances when building a circuit it is all you need.

    Also do you mind building your t-flipflop as a ship and uploading it to this thread? I tried several times to get it to work and it never does anything.
     
    Joined
    Aug 14, 2013
    Messages
    2,811
    Reaction score
    960
    • Councillor 3 Gold
    • Wired for Logic
    • Top Forum Contributor
    T-FlipFlop.sment
    There are 2 T-flipflops on there, one compact and one non-compact. The activators with plexlights above them serve as output.
    Thankyou I see where I was going wrong. Going off your image you have "output" written over top of the "or" block so I couldn't actually see what it was I used an "and" instead. Also if you connect the "and" from the input back to the activator you don't need to turn it off manually before triggering the circuit again making it much more user friendly. I'll have to compare this side by side to the t-flipflop I built and see which one is faster and/or smaller (I imagine yours is the smaller)
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Also if you connect the "and" from the input back to the activator you don't need to turn it off manually
    T-flipflops are most commonly used without a manual input, instead the input is either another logic circuit(like an oszillator[a clock]), or a sensor(like the area triggers). This is why making a link back to the input in this tutorial circuit is not productive, as it excludes the most common uses.
     

    Fellow Starmadian

    Oh cool so thats what this is
    Joined
    Jun 7, 2014
    Messages
    227
    Reaction score
    87
    • Community Content - Bronze 1
    • Wired for Logic
    • Legacy Citizen 2
    BRAAAAIINS
    (sorry for reviving a dead post)
    I figured out that the NAND gate has to have the NOT gate (in the NAND gate) manually started before the circuit would work. Wierd but I just hooked up a temporary activation module to that NOT gate on the NAND and cycled it. Very crafty build megacrafter!
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    BRAAAAIINS
    (sorry for reviving a dead post)
    I figured out that the NAND gate has to have the NOT gate (in the NAND gate) manually started before the circuit would work. Wierd but I just hooked up a temporary activation module to that NOT gate on the NAND and cycled it. Very crafty build megacrafter!
    Sometimes one doesn't need to do that, sometimes one does. It depends on how the circuit is oriented and shaped.
    Also, thx
     
    Joined
    Nov 3, 2014
    Messages
    624
    Reaction score
    287
    • Community Content - Bronze 2
    • Wired for Logic
    • Legacy Citizen 6
    Thank you so much for this.
    If it does not work initially you may have to "charge" the not block from the nand to dothat disconnect the and block from it's sources and activate it again then deactivate it and reestablish the connections. afterwards it works.