I'm making a project and I'm using multiple 1 digit 7 segment displays. I haven't plugged them all on my arduino because currently I'm just testing. The problem is on the I/O ports. Obviously I need to use shift registers and since it's my first time ever using them I need to know more about them. After googling, I found that the specific model I bought outputs 8 pins and you can stack up to 8 in series. So lets do the math. 8 shift register
x 8 pins each SR
= 64 new pins
It seems cool but assuming I'm using 28 displays let's do the math again.
28 displays, each display has 8 pins (8 for segments and 2 as common cathode)
28
x 8
= 224
required pins.
Is is possible to expand the I/O pins by 224 pins? How many shift registers can I stack together? Also which is better, the single digit display or the 4 digit display?
2 Answers
You can chain as many shift registers as you want.
Most commonly, these displays are multiplexed. Only one digit is lit at a time, cycling though all the digits fast enough, so the eye can't tell. This is however not very good practice for 28 digits, as the brightness will become 1/28th (though you could create groups of digits, and multiplex those groups separately).
There are specialized chips that do this multiplexing for you. E.g. the Max7219. This chip can multiplex 8 digits, with 8 segments. So you'd need 4 of these to light up 28 digits.
-
Is the Max7219 using an SPI pin? If yes since im using an ethernet shield how can i make it work? Apr 2, 2015 at 21:10
-
datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf SPI, QSPI and Microwire. You should check the datasheet first and then ask. You can make it work by using the slave-select pins, to choose one of the devices to send to. arduino.cc/en/Reference/SPI– PaulApr 3, 2015 at 12:10
You can buy these displays on eBay for a few dollars. A bit of soldering and you are done (although also pre-assembled ones are available). They can be daisy-chained. Example:
You only need 5 wires to the Arduino: Gnd/5V/MOSI/SCK/SCK.
Also, 64-dot displays for displaying arbitrary text:
Again, only 5 wires.
I have Arduino libraries for driving both sorts of display on Interfacing LED displays with the MAX7219 driver .