Hi,
I am looking to replicate the design below on 8x 7-segment displays, and for this purpose, I will need 2x 74HC595 via the SPI interface.
Can someone please let me know, through an example, how I can multiplex those 8 digits on an Arduino Nano 328?
Is it possible to do it only via SPI, or will I need a common anode/cathode for each digit?
Thank you,
Andreas
2x 74HC595 via SPI interface, driving 8x 7-segment display
-
andeug
- Posts: 60
- http://meble-kuchenne.info.pl
- Joined: Thu Jan 07, 2021 1:42 pm
- Location: Stockholm (SE)
- Has thanked: 19 times
- Been thanked: 2 times
2x 74HC595 via SPI interface, driving 8x 7-segment display
FC11 Professional + ARD + ARM license + Matrix TSL E-blocks2 boards
Mikroe Click boards + Click Shield for ST Nucleo-32 + Clicker 4 for ST STM32F407VG
Mikroe Click boards + Click Shield for ST Nucleo-32 + Clicker 4 for ST STM32F407VG
-
mnfisher
- Valued Contributor
- Posts: 1855
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 154 times
- Been thanked: 875 times
Re: 2x 74HC595 via SPI interface, driving 8x 7-segment display
The 74HC595 devices are daisy-chained - so writing values will 'push' the data to the second chip... So you just need to write sufficient data for both devices before latching the data. I haven't used this - but the MAX7219 works in a very similar manner.
Martin
Martin
-
stefan.erni
- Valued Contributor
- Posts: 1160
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 221 times
- Been thanked: 238 times
Re: 2x 74HC595 via SPI interface, driving 8x 7-segment display
Hi Andreas
Note that each digit only lights up briefly, for example 1 msec, and then remains dark for 7 msec (with 8 digits).
you just can't see it with the eye so fast.
You have to do this with the esp32.
If you use a MAX7219 as Martin suggests, the Max will take care of this timing.
Ready-made modules with MAX7219 are available for just a few euros.
Yes, you need a common anode for each digit.I need a common anode/cathode for each digit?
Note that each digit only lights up briefly, for example 1 msec, and then remains dark for 7 msec (with 8 digits).
you just can't see it with the eye so fast.
You have to do this with the esp32.
If you use a MAX7219 as Martin suggests, the Max will take care of this timing.
Ready-made modules with MAX7219 are available for just a few euros.
-
andeug
- Posts: 60
- Joined: Thu Jan 07, 2021 1:42 pm
- Location: Stockholm (SE)
- Has thanked: 19 times
- Been thanked: 2 times
Re: 2x 74HC595 via SPI interface, driving 8x 7-segment display
The problem is that the MAX7219 does not exist officially in Flowcode's library, despite being quite a common product among hobbyists...
FC11 Professional + ARD + ARM license + Matrix TSL E-blocks2 boards
Mikroe Click boards + Click Shield for ST Nucleo-32 + Clicker 4 for ST STM32F407VG
Mikroe Click boards + Click Shield for ST Nucleo-32 + Clicker 4 for ST STM32F407VG
-
mnfisher
- Valued Contributor
- Posts: 1855
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 154 times
- Been thanked: 875 times
Re: 2x 74HC595 via SPI interface, driving 8x 7-segment display
There are quite a lot of MAX7219 drivers around though - I've done ones for the 8 x 8 grids, digits and most recently - 32 x 32
(the last is the simplest and supports simulation too!)
The actual data required is simple - output to all of the attached drivers and then latch a line at a time.
Martin
The actual data required is simple - output to all of the attached drivers and then latch a line at a time.
Martin