Go Down

Topic: BCD Multiplexing (Read 750 times) previous topic - next topic


Im looking for a clever way to use a BCD switch with only 2 or less I/O pins. Im trying to port some code from a Uno to a ATtiny85 Pin part. I only have 2 I/O pins left over and need a user input of 0-9. Any suggestions?
Tripp Williamson


the best i feel like you could do with 2 pins is a taper pot.  although with that, you are only going to be able to select one, and you won't know which one you are in, also you are going to need to implement code such as when A0 is less than this, do this, but when A0 is greater than this but less than this, do that.

Along with that issue, I believe the ATtiny85 has 4 analog pins, and you may be using them.

Accelerate to 88 miles per hour.


Well you could use the BCD switch to feed a simple four resistor D/A and then read it with an analogue input.


Accelerate to 88 miles per hour.


Digital to Analogue converter.

Go Up

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

shortcuts: alt+s submit/post or alt+p preview