Could you check my dual LED SPDT circuit please?
groggory
Posts: 205
I'm using the dual LED SPDT switch from this series.
http://www.nkkswitches.com/pdf/gtogglesilluminated.pdf
The expected operation for P9 | P10 , LED
UP: 01 , green lit
Mid: 11, both off
Down: 10, red lit
Did I get it right?
Comments
Great. Thank you.
That dang switch took some finagling around for me to figure out how to get that operation. My old circuit had the LEDs going the other way.
with both of these resistors removed?
Without R80 when you flip the switch up you'll short VCC to GND. Boom.
Without R81 when you flip the switch down you'll short VCC to GND. Boom.
Humble opinion:
Because only 1 led will run at any given time...
You could move R80 to the com line going to ground, and remove R81.
No go boom and a penny saved is a penny saved.
KK
But then you'll miss out on some functionality you may have forgotten.
The states of P9 and P10 won't change correctly.
But P9 and P10 are pins on my microcontroller. Your diagram isn't showing that state change. That's what I was describing in my wording because the picture doesn't make it immediately apparent.
Thank you. I get it. But you guys are just missing one of my purposes in this circuit.
:-) Thank you.
And you want the switch just to signal a state to mcu,
and using open drain with pull up to make sure state is not floating.
The cool part would be that you can blink the led's in software by turning
the pin around to an output with a 0 state.