TransWikia.com

SPDT Switch in Logisim

Electrical Engineering Asked by shriekyphantom on January 30, 2021

How do I implement an SPDT switch in Logisim? I need it for connecting 2 pins to ground but not at the same time.

2 Answers

I was hoping there was an answer. As there doesn't seem to be, I thought I'd try to make one. This is what I came up with. The obvious minor problem is the 'not connected' pin in the off position. Though it doesn't actually seem ot affect further circuitry. The trick was with the controlled inverterLogic switch

Answered by gavin on January 30, 2021

You can't really, as LS doesn't have any static switch components.

You can however simulate one in a sort of round about way, it's not Ideal but it should work.

Since a single pole double throw is essentially used to switch one input between two output's, you could in theory use a 1 bit MUX component activated by a single press button.

The problem you have here is that the push button component is spring loaded, so as soon as you let go your going to flip back to 0.

You could possibly get a little more creative and use one of logisims S/R flip flops, wire that up with a couple of inverter's and some controlled buffers and you could rig up a switch that flips from one output to the other and remembers it every-time the push button is pulsed.

Lastly, if you know the Java programming language, then you could quite easily write an SPDT component.

In fact, I've just added it to my list of components (I'm writing an extension library for Logisim as I type this) to add to LS and make it better.

Update (Just over 30 mins later)

Needed to give myself a few mins to work it out in my head, but the following circuit produces what an SPDT switch would do.

SPDT Circuit

You have 2 outputs (Where the RED Led's are) and the +5 signal will switch between them every time you push the button at the other end.

Effectively switching a TTL Logic one (5v) output from one pole to the other.

If you build this as a sub circuit, and replace the constant 1 that's on the input to the dmx with an input pin and the push button with an input pin, then replace the 2 led's with output pins, you can then just drop it onto your master circuit as a reusable component, and connect a button to the button input, put the signal to switch on the constant input and toggling the button input will switch your input signal between the two outputs. The useful thing about how this works is, because the button input is just a toggle, you could actually drive the signal to switch it off some other logic if you wanted to.

Answered by shawty on January 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP