PHOBoS
Joined: Jan 14, 2010 Posts: 5591 Location: Moon Base
Audio files: 705
|
Posted: Sat Nov 15, 2014 4:51 pm Post subject:
|
|
|
Starting from that basic circuit I designed the following 2 circuits.
The first one is the MASTER sequence generator:
U3 is a 4bit adder and U2 contains 8 D-type flipflops. I used TTL because the only CMOS full adder is the CD4008 which appears to be obsolete
and I have a bunch of 74LS83 chips anyway. I also have a couple of 74LS377 chips so those came in handy too. Although the basic circuit works,
it doesn't have an option to insert the first (Seed) values. This is what U1 is used for. It is actually an Octal Bus Transceiver chip but I'm
using it as an Octal switch. With the DIR pin (1) held high data flows from A to B, at least as long as the Output Enable pin (19) is at
a low level. When it is at a high level the outputs are floating (it has 3-state outputs).
The Output Enable pin is controlled by U4a which also enables the seed switches. So when Q is high the datastream gets interrupted and the data
from the switches is inserted. Using a Flipflop for this isn't necessary but it keeps everything in sync with the CLK. The 2k2 pullup resistors
are added because U1 is not TTL but high speed CMOS. And because U4 is also CMOS and can only drive one TTL input the transistor buffer is needed.
I also added a reset option using U4b, when the reset button is pressed the datastream is interrupted but the seed switches aren't enabled so seed
A and B are both 0. The result is that all the outputs will be low and stay low untill new seed values are added.
The second circuit is the SLAVE sequence generator:
It's pretty much the same as the MASTER generator except that it doesn't have the seed section. Instead it uses the carry out from the MASTER
circuit and it's used to turn it from a 4 bit generator into a 8 bit generator (and you can add more SLAVE circuits for more bits). You could
add seed switches too but 2x 4 bit is enough for me.
I haven't actually tested the circuit yet (didn't have a free breadboard yet and I don't have any 20 pins sockets to solder it either) but I did
simulate an 8 bit sequence generator. For an 8 bit generator the maximum output value can be 255 and higher values are truncated, so the sequence
pattern won't be correct after that. I was expecting that it would either just zero out or repeat a short sequence, however it keeps going and can
create a sequence with a maximum lenght of 384 steps (depending on the seed values) before it repeats.
with seeds 0 and 1 the full sequence is:
Code: | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,
55, 89, 144, 233, 121, 98, 219, 61, 24, 85,
109, 194, 47, 241, 32, 17, 49, 66, 115, 181,
40, 221, 5, 226, 231, 201, 176, 121, 41, 162,
203, 109, 56, 165, 221, 130, 95, 225, 64, 33,
97, 130, 227, 101, 72, 173, 245, 162, 151, 57,
208, 9, 217, 226, 187, 157, 88, 245, 77, 66,
143, 209, 96, 49, 145, 194, 83, 21, 104, 125,
229, 98, 71, 169, 240, 153, 137, 34, 171, 205,
120, 69, 189, 2, 191, 193, 128, 65, 193, 2,
195, 197, 136, 77, 213, 34, 247, 25, 16, 41,
57, 98, 155, 253, 152, 149, 45, 194, 239, 177,
160, 81, 241, 66, 51, 117, 168, 29, 197, 226,
167, 137, 48, 185, 233, 162, 139, 45, 184, 229,
157, 130, 31, 161, 192, 97, 33, 130, 163, 37,
200, 237, 181, 162, 87, 249, 80, 73, 153, 226,
123, 93, 216, 53, 13, 66, 79, 145, 224, 113,
81, 194, 19, 213, 232, 189, 165, 98, 7, 105,
112, 217, 73, 34, 107, 141, 248, 133, 125, 2,
127, 129, 0, 129, 129, 2, 131, 133, 8, 141,
149, 34, 183, 217, 144, 105, 249, 98, 91, 189,
24, 213, 237, 194, 175, 113, 32, 145, 177, 66,
243, 53, 40, 93, 133, 226, 103, 73, 176, 249,
169, 162, 75, 237, 56, 37, 93, 130, 223, 97,
64, 161, 225, 130, 99, 229, 72, 45, 117, 162,
23, 185, 208, 137, 89, 226, 59, 29, 88, 117,
205, 66, 15, 81, 96, 177, 17, 194, 211, 149,
104, 253, 101, 98, 199, 41, 240, 25, 9, 34,
43, 77, 120, 197, 61, 2, 63, 65, 128, 193,
65, 2, 67, 69, 136, 205, 85, 34, 119, 153,
16, 169, 185, 98, 27, 125, 152, 21, 173, 194,
111, 49, 160, 209, 113, 66, 179, 245, 168, 157,
69, 226, 39, 9, 48, 57, 105, 162, 11, 173,
184, 101, 29, 130, 159, 33, 192, 225, 161, 130,
35, 165, 200, 109, 53, 162, 215, 121, 80, 201,
25, 226, 251, 221, 216, 181, 141, 66, 207, 17,
224, 241, 209, 194, 147, 85, 232, 61, 37, 98,
135, 233, 112, 89, 201, 34, 235, 13, 248, 5,
253, 2, 255, 1, ( 0, 1, 1, 2, 3...) |
I wrote a little (java)script to generate sequences which I uploaded here
Description: |
Fibonacci Sequence generator circuit (MASTER) |
|
Filesize: |
73.1 KB |
Viewed: |
932 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
Description: |
Fibonacci Sequence generator circuit (SLAVE) |
|
Filesize: |
52.97 KB |
Viewed: |
782 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
_________________ "My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube |
|