Author |
Message |
PHOBoS
Joined: Jan 14, 2010 Posts: 5591 Location: Moon Base
Audio files: 705
|
Posted: Fri May 25, 2012 1:33 pm Post subject:
forced state switch Subject description: forcing a data line to 0 or 1 |
|
|
Something that I think can be very usefull is a switch to force a signal high or low. One example would be
to put it in a shiftregister feedback loop, so you can increase or decrease the number of bits being shifted.
(It's actually because I'm working on such a circuit that I got reminded of it again. )
Here are 3 ways of doing it (X = signal input, Z = output, 0 = low level, 1= high level).
1) the 'dirty' version. For this method you only need a toggle switch with a center position and 1 current
limiting resistor, so you don't just short it. (100K works fine).
2) the 'mux' version. This might be the most obvious method. I drew 4 versions;
low level toggle switch, high level toggle switch,
low level pushbuttons, high level pushbuttons.
In the example circuits 1 has priority over 0. This doesn't matter if you use a toggle switch,
but in case of the pushbuttons pressing both will result in a forced 1. Offcourse the advantage
of using a mux is that you can completely customize it to your needs.
3) the 'logic' version. It's also possible to use some logic gates. The NAND circuit uses low level
pushbuttons (offcourse you can use a toggle switch for this aswell) and 1 has priority over 0. The NOR circuit
uses high level pushbuttons and 0 has priority over 1. I prefer the NAND version because the
schmitt triggers provide some nice debouncing (just add a cap over the switches) and I think the
spare NAND gates are more usefull then NOR gates.
If anyone has some other methods I'd like to see them
Description: |
|
Filesize: |
41.23 KB |
Viewed: |
253 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 |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Fri May 25, 2012 1:39 pm Post subject:
|
|
|
When using an SR flip flop you can use momentary switches (one for set one for reset), or a toggle switch, and it will debounce perfectly (unless you'd press both buttons simultaneously).
Look at this page for example. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Draal
Joined: May 18, 2010 Posts: 308 Location: Oak Park, IL
Audio files: 5
|
Posted: Fri May 25, 2012 1:53 pm Post subject:
|
|
|
Cool and simple. I have + and - jacks that do the same thing when needed. These type of things can get overlooked but play a great role in patching sessions. _________________ Zontar Prevails! |
|
Back to top
|
|
|
DGTom
Joined: Dec 08, 2008 Posts: 211 Location: Adelaide
Audio files: 3
G2 patch files: 1
|
Posted: Fri May 25, 2012 3:15 pm Post subject:
|
|
|
For SR feedback loops I like to use an XOR as a conditional inverter. Connect one input to a switch & the final stage (or an external input) into the other.
if the input is low pushing the switch makes the output high, if the input is high the switch makes the output low.
or you can wire up two switches, similar to the NAND logic version, one input with a pull up resistor & momentary switch to ground, one input with a pull down resistor & momentary to +ve. |
|
Back to top
|
|
|
PHOBoS
Joined: Jan 14, 2010 Posts: 5591 Location: Moon Base
Audio files: 705
|
Posted: Sun May 27, 2012 5:13 am Post subject:
|
|
|
Blue Hell wrote: | When using an SR flip flop you can use momentary switches (one for set one for reset), or a toggle switch, and it will debounce perfectly (unless you'd press both buttons simultaneously). |
SR flip flops are nice for debouncing and to create on/off switches with pushbuttons. But useless
for this purpose, since I need 3 states: 0, 1 or passing through a signal. As for the problem of pushing
two buttons at once, If you buy them in chip form (not made from 2 gates) they come with a priority like
Set over Reset. You can make very nice menu/radio switches with these
DGTom wrote: | For SR feedback loops I like to use an XOR as a conditional inverter. Connect one input to a switch & the final stage (or an external input) into the other. |
ah yes, I used XOR's for that too, works great! _________________ "My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube |
|
Back to top
|
|
|
|