Pages: [1]   Go Down
Author Topic: BCD Multiplexing  (Read 619 times)
0 Members and 1 Guest are viewing this topic.
South Carolina
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Tripp Williamson
KG4UAL

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1000
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Accelerate to 88 miles per hour.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31337
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1000
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Whats a D/A Grumpy?
Logged

Accelerate to 88 miles per hour.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31337
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Digital to Analogue converter.
Logged

Pages: [1]   Go Up
Jump to: