1. If you're looking for help-related things (for example, the key rebinding tutorial), please check the FAQ and Q&A forum! A lot of the stickies from this forum have been moved there to clean up space.
    Dismiss Notice

[Guide] Advanced Wiring Guide

Discussion in 'Starbound Discussion' started by SeaJay, Dec 24, 2013.

  1. MeMyselfAnDie

    MeMyselfAnDie Seal Broken

    Haha go ahead. It's much more fun to see what amazing things people make and be able to say: "I helped with that" than to hoard stuff.

    Also, I was curious so I made a Latch gate using other logic gates:
    LogicalLatch.jpg

    The hand scanners are just convenient toggles representing the top and bottom inputs
    The criss-crossed NOT gates basically just hold whatever postion you leave them at (don't use this setup with the single tick pulse, it makes spazziness), the AND gates make it so the top one has to be on for the bottom one to affect anything.
     
  2. MeMyselfAnDie

    MeMyselfAnDie Seal Broken

    I just realized your thread was originally a guide for using latches, and not a general wiring post, and I seem to have hijacked it. Oops
     
  3. SeaJay

    SeaJay Space Kumquat

    Made a cute 4-bit counter using your thing. I had to rebuild parts of it a few times because Starbound's wiring system glitches out a lot for me.

    I'm also going to see how well this works in real life later. I'm not optimistic, to be honest.

    [​IMG]

    I was going to rename it "Sequential Logic" or something, but then you'd get people thinking "What the hell is sequential logic?", so it'll stay. I'll stick (With cool examples!) on the end of the thread title.

    I'm in the process of making a combinational logic guide for more basic stuff.
     
  4. MeMyselfAnDie

    MeMyselfAnDie Seal Broken

    Well post a link when you do and i'll migrate. For now, I got a display for my counter for 0-9 working, the video is rendering now. In the meantime:
    Killme.jpg
     
  5. SeaJay

    SeaJay Space Kumquat

    The combinational guide can be found here. I'd keep stuff about counters in this thread, though.

    How does that thing reset when it hits 10?
     
  6. MeMyselfAnDie

    MeMyselfAnDie Seal Broken

    since 9 is bx1001 i have an AND gate hooked up to the bits for 1 and 8, and that output and the standard ticker into another AND gate that resets it. so when 8 and 1 are active and the timer ticks, it resets to zero and ticks the next tens place. The video is up
     
  7. Eht

    Eht Void-Bound Voyager

    Y u guys so smaaaaart T~T Fine then, challenge accepted! (Luckily for me, Minecraft logic gates and these work identically, so I've got something hidden up my sleeve :3)
     
  8. Eht

    Eht Void-Bound Voyager

    Well, I came up with something after a couple hours of blind testing. Sadly, I don't understand binary so my design won't be space-efficient like you guys', but conversely, it may be easier to understand for everyone else who doesn't know binary.
    So, here it is.
    [​IMG]
    [​IMG]
    [​IMG]
    1. Pulse ticker (I don't know what else to call it xD) When a signal is generated from the left (USMC Fingerprint Scanner), it generates a 1-tick pulse through the NOT gate on the right
    2. I'll call these cells for now. Each cell (in this case) acts as one digit from 0-9, either being off or on. When a pulse is received in the bottom of the AND gate, it will turn off the cell and activate the next cell
    3. OR gate lines, just carries power to the AND gates. Not necessary, but makes the system more expandable, and this way I don't have to hook the pulsar to every AND gate

    So, I understand this isn't anywhere near effecient or really GOOD at all, it's just a prototype that I built without any prior tactics or knowledge. It simply counts from 1-10 (Display and output is the Latches on the top row). It's not as simply wired as the binary counter, but it's probably easier to understand for people whom don't know binary (Although it's probably easier to just learn binary than this).
    You might count 11 cells instead of 10, and there's a reason for that. The 10th cell for some odd reason, is skipped =/ so the 10th output is the 11th cell. This system IS expandable, by adding rows above this, but isn't very compact =/ I'll get working on that.
    By hooking up the last output to the next row of cells, you can effectively make a device that counts up, since the next row would only have a digit progressed when the previous row reaches 10, or , however you look at it. Using this method, it's pretty uniform to make a counter that can easily go up to whatever digit you desire, and the length of the row can be changed to change the count limit, to make clocks or whatnot. I don't think the ever-so-slight delay from the pulse generated from the left should really do anything to annoy people, it's pretty short. Back to work!
    (BTW, here's two cells by themselves, easier to see wiring)
    [​IMG]


    UPDATE: I think I died a little inside.
    [​IMG]
     
    Last edited: Dec 28, 2013
    SeaJay likes this.
  9. hakari

    hakari Subatomic Cosmonaut

    Or I could just take out my meteorite gun and blow up the trading room?
     
  10. Eht

    Eht Void-Bound Voyager

    >.< Most of these things are a proof-of-concept, not a can-you-break-the-system.
     
  11. SeaJay

    SeaJay Space Kumquat

    Well if you're going to cheat, then what's the point anyway...?
     
    Unclever title and Eht like this.
  12. Sherisky

    Sherisky Poptop Tamer

    [​IMG]
    Six Sequential numbers needed to open the door.After the third failure, the door can not be opened.Enter the door, circuit recovery.
     
    Eht and SeaJay like this.
  13. Sherisky

    Sherisky Poptop Tamer

    one number(7) of the password like that:
    [​IMG]
    The above latch connects the true number,and the below one connects others.
    if we input the wrong number,the circuit will be initialized.When we input 7,we can input others later.

    and that is the three numbers(728) of the password. If you need more, same to that:
    [​IMG]
    We can delay a signal by saving of the latch. Like that one:

    [​IMG]
    If we input the wrong number,One latch will saving a signal①.When the end of the the initializing,other signal② will be saved by ①.Then we can save a signal about the second cycle about initializing by ②,if worng agin.


    Mein coded lock:
    [​IMG] [​IMG] [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
    Last edited: Jan 5, 2014
    SeaJay and Eht like this.
  14. saik0

    saik0 Space Spelunker

    Synchronous Counter Guide

    As seen in:



    Here's how it's done

    A synchronous counter differs from a ripple counter in that the clock pulse is applied to all flip-flops simultaneously. Using D latches we hold the current state. With combinatorial logic we can solve for the next state. By using the pulse shortener to deliver one tick pulses the next state becomes the current state, and a new next state is then calculated.

    A little combinatorial analysis tells us that to count up:

    Code:
    D0 = NOT(Q0)
    D1 = XOR(Q1, Q0)
    D2 = XOR(Q2, AND(Q0, Q1))
    D3 = XOR(Q3, AND(Q0, Q1, Q2))

    See the pattern? The rest is just wiring. Here's an example, out of convention the least significant bit on on the right.

    [​IMG]
    Layout with no wiring


    [​IMG]
    Setup a timer with a "pulse shortener" (Note: Both edges trigger a one tick pulse)


    [​IMG]
    Cross-couple the latches to the above gates


    [​IMG]
    You can see each latch's data input is a XOR of it's own output with a rippling AND of all the previous latches.


    [​IMG]
    A shot of only the top portion, so it's clearer.


    [​IMG]
    Now just wire up the clock pulses.

    I hope you enjoyed. Happy counting.
     
    Last edited: Jan 5, 2014
  15. Balmer

    Balmer Big Damn Hero

    I used to feel good about making automatic doors for myself. I hate you all :p
     
    Eht likes this.
  16. Sherisky

    Sherisky Poptop Tamer

    ╮( ̄▽ ̄)╭I didn't learn anything about Digital circuit before. Jetzt i just know the effect of every circuit components.
     
    Eht likes this.
  17. Balmer

    Balmer Big Damn Hero

    Seeing some of this two weeks after the wiring stuff was enabled makes me expect that I'm going to see YouTubes with working pong games by launch.
     
    SeaJay and Eht like this.
  18. saik0

    saik0 Space Spelunker

    Did you know the wall switches had an input? I didn't! Makes them easy to chain together to make a loadable counter. To count down just skip the inverters. Bulbs optional =D

    (Switches are rising edge triggered and always toggle)

    [​IMG]

    [​IMG]
     
    SeaJay likes this.
  19. SeaJay

    SeaJay Space Kumquat

    Wow, this makes any other type of counter defunct (well, this and a synchronous version would), but flip-flops are still useful for state machines. I will need to add this information into the OP.

    I don't have the Small Wall Switch anywhere in my recipes for some reason (does anyone else have this problem?), so I haven't had the chance to use it yet. Will cheat some in now to play with.

    Thanks.

    Edit: Hacked some switches in so I could have a bit of a play around with them. Here's a ridiculously small 8-bit version, I never dreamed it possible to make them this small.

    [​IMG]

    One-tick pulse button, anyone? (Edit: No longer allowed as of Upbeat Giraffe.)

    [​IMG]

    When I'm less tired I'll explore the possibilities further.
     
    Last edited: Feb 19, 2015
  20. saik0

    saik0 Space Spelunker

    Edge Detection

    A signal edge is the transition from a low state to a high state (or vice versa). A rising edge means going from low to high, a falling edge is going from high to low. A double data rate transfers data on both edges of a clock. Using two gates we can detect any edge. These examples send a one tick pulse, which is useful for synthesizing a flip-flop form a latch. Connect a few latches to one of these and you're on your way to a clocked synchronized state machine.

    Rising edge
    [​IMG]
    [​IMG]

    Falling edge
    [​IMG]
    [​IMG]

    Double data rate (trigger on rising and falling edge)
    [​IMG]
    [​IMG]
     

Share This Page