Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clock Component for Mechanics
#1
The component would functions as such:
- connect to the floor with a wrench
- has an input for something such as a button
- it sends a signal after a pre-defined amount of time
- time is defined through a right-click option for setting the delay
- connect the clock to the component, and it will activate it after the delay is up, then reset

Currently there is no reliable clock you can make in mechanics, it seems you have to either use buggy accelerators, or buggy pipes. This would make it so you could create a lot of cool devices, without the hassle of having to waste your time making and maintaining a buggy clock. It would also allow for more precise timing or the signals, rather than having to increase the distance traveled by an item.

I don't know if a clock component used to be an item and was removed due to abuse, but I think that it would allow for some pretty cool creations with only minor admin intervention due to abuse. Of course for you far more experienced mechanics out there, feel free to state any concerns or glaring abuses you could see this used for, and possible nerfs to the idea to counteract it.
Reply
#2
Unless I'm severely misinterpreting it, couldn't you hook up a delay component to a control unit set on repeat? I'm pretty sure that functions more or less similar to what you're asking for. Of course, no harm in having that be a single component.
Reply
#3
You currently have two options:

Delay component: Easy to set. Useful for general things.
Control Unit: I just use b080 and add as many 00's to the end of that as I need. Works well enough.
Reply
#4
If these are added, might I suggest also adding J-K, S-R, and D Flip-flops in one compressed component, as it stands, these are all currently impossible to make since you cannot have two components send logic to one another, FF's allow for all sorts of cool device to be built. Clocks tend to be essential to the functions of both the J-K and D type so.
Reply
#5
You can definitely use the control unit as a clock.
Reply
#6
Dabir Wrote:You can definitely use the control unit as a clock.

But I am dumb and there is no guide on how to use it frown
Reply
#7
To use it to que actions is the only thing I remember right now. A few months ago I remember being able to do more, but I lost my research, which happens because I'm a dumbass and title my docs vaguely.

The basics on the CU:
Examine Info Wrote:Control Unit:
This is Control Unit.
* Instructions: Word size in this setup is one byte, one nibble is the instruction and the other is the operand. In that order. A0 is opcode A operand 0.

* 0 and F are NOPs

* 1 (LD) loads an input value into the accumulator, RR. Input 0 is !RR.

* 2 (LDC) acts like 1, but with the complement of the input

* 3 (AND) sets RR to the logical AND of RR and the input.

* 4 (ANDC) sets RR to the logical AND of RR and the complement of the input

* 5 (OR) sets RR to the logical OR of RR and the input

* 6 (ORC) sets RR to the logical OR of RR and the complement of the input

* 7 (XNOR) essentially equates RR and the input, with RR set to the result of the test.

* 8 (STO) store RR in either a RAM addess (High 8 bits) or one of 8 outputs (Low 8 bits).

* 9 (STOC) store complement of RR in the same was as STO.

* A (IEN) sets IEN to the input. IEN is Input ENable.

* B (OEN) sets OEN to the input. OEN is Output ENable.

* C (JMP) will adjust the program counter by up to 32 addresses, forward or backward from the current instruction. Arguments 8+ will subtract 7 and then jump 4x that value forward, less than that will jump back 4x (that value + 1)

* D (RTN) skip next instruction. For some reason.

* E (SKZ) skip next instruction if RR is zero.


Output signals have the value "PIN:VALUE" i.e "2:1" to output true on pin 2. You can filter this with OR gate triggers, ok.
Example program: "30A0B01181" Will AND RR with 0 on the first iteration (As IEN is zero) and AND it with !RR on subsequent loops (Both set it to zero), load !RR (1) into IEN and OEN, then load input 1 and send it to output 1. This will repeat without end.

Step by step for a repeating signal:
Wrench CU into place.
Right-Click with multitool in hand and Set ROM to b080.
Click-Drag CU onto another to set what it's signal does. Let's say we hooked it up to a speaker component.
Right-Click with multitool and select Activate.
Done.

Now you'll see that the speaker component will be repeatedly outputting 0:0. The CU's signals are key value pairs in the form of OUTPUT:RR.

What b080 does:

b0 sets OEN(b) to input 0, which is !RR. RR starts at 0, so NOT(!) RR is the opposite. This means that b0 sets OEN to 1 and enables the CU's ability to send signals.
80 send the value of RR, which is currently 0, to output 0. That's why the signal shows up as 0:0.
The CU reaches the end of the instruction set, then repeats the instructions, and this continues until it has been disabled.
If you want to increase the time between pulses you can add 00s to the end of b080 and it will delay the next pulse. Or you can just hook the output into a delay component.

More complex things can be built using the logic gates and key-value pairs. Says the person who's tripping on toggle components, anyways.

You probably knew all of this. Might help somebody, though.
Reply
#8
69andahalf Wrote:
Dabir Wrote:You can definitely use the control unit as a clock.

But I am dumb and there is no guide on how to use it frown
if you examine it, it gives you a guide on how to make a clock, abs even provides a complete 3 second clock program
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)