Go Down

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

twilliamson

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
KG4UAL

funkyguy4000

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.

Grumpy_Mike

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

funkyguy4000

Accelerate to 88 miles per hour.

Grumpy_Mike

Digital to Analogue converter.

Go Up