06-06-2015, 07:54 AM
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:
Step by step for a repeating signal:
You probably knew all of this. Might help somebody, though.
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.
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.