Is there a trick to using fewer resistors that I'm missing?
dc42 - All 11 ATtiny pins are in use - 4 go to a TLC5916 (latch, clock, data, enable), 2 go to an i2c device, 1 goes to an on/off pushbutton, and the remaining 4 go to this DIP switch array. I'd never seen diode multiplexing before either; thanks for introducing that to me as well. I'll keep that in mind for future projects.
Thanks for the idea. I originally had the pushbutton on its own pin (PB2) so I could use the hardware interrupt on it, but since I have to poll the pins for the DIP switches anyway I think I can make it work.
Quote from: magagna on Feb 02, 2013, 10:12 pmThanks for the idea. I originally had the pushbutton on its own pin (PB2) so I could use the hardware interrupt on it, but since I have to poll the pins for the DIP switches anyway I think I can make it work.It's quite possible to use multiplexed input pins like this and still to have an interrupt generated when the system is idle and a particular button is pressed. I've recently done that in one of my designs, where I wanted to wake the system from sleep mode when a particular button is pressed (because that button doubles as the power button).
Henry_Best - I didn't know resistor arrays like that existed. Thanks!
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16