Decade Counters and Arduino
Moderators: adafruit_support_bill, adafruit

Decade Counters and Arduino

by sjrapid on Fri Feb 01, 2013 5:44 pm

I'm considering using Adafruit Decade Counters (https://www.adafruit.com/products/1084) as input to a countdown timer, but it seems like they'll need 10 pins each to read, and even a 54 pin Arduino mega will run out of pins if I have h:mm:ss to read twice.

Could anyone suggest a neater way of reading 2 x 5 digit counters using fewer arduino pins?

Many thanks

Steve
sjrapid
 
Posts: 1
Joined: Mon Jan 28, 2013 9:29 am

Re: Decade Counters and Arduino

by Zener on Fri Feb 01, 2013 6:22 pm

Multiplex. You will need 20 pins. Technically there are ways to do it with even fewer pins, such as 8 , or maybe even as few as 3 using serial devices, but multiplexing is pretty straight forward. Each digit's common goes to an IO pin. So that is 10 right there. Then all the 0's are hooked together, all the one's etc. And all those get connected to IO pins, so that's 10 more. And you also attach those to pullups, one for the 0's line, 1 for the 1's line etc. So when you lower the common for that digit, you can read it, then go on to the next digit.
Zener
 
Posts: 2759
Joined: Sat Feb 21, 2009 2:38 am