Multiplexing a Multiplexer

ian field

Joined Oct 27, 2012
6,536
I'm not sure which displays I'll use; but they will be small. I ordered 0.56" and 0.36" already to compare. The 4 at have at home for testing are 0.56".

Now that you mention it, the first digit of each row will always be the same; but the rest (16 digits) will be all different.

Yes, I was beginning to consider using the MAX7219 that MMcLaren suggested above as the best option. Either that, or simply using transistors to increase the peak current on each refresh; maybe even using a few ULN2003 or similar instead of single transistors.

About the pre-built displays: initially, I prefer not to use them; even though I know they are cheaper than if I put it together myself. Besides, I'm not sure I'll find them with 5 digits each.
These days most people putting a display on a micro opt for a 44780 LCD module.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
I had an idea...

Could 4 small and inexpensive PICs be used to refresh each of the 4 rows; instead of using 4 expensive MAX721?

I mean, can't I program each of the 4 PICs to refresh its 5 digits, while the main MC just sends the data to be display on each row?

Is something like this doable?... any pros or cons?
 

elec_mech

Joined Nov 12, 2008
1,500
Could 4 small and inexpensive PICs be used to refresh each of the 4 rows; instead of using 4 expensive MAX721?
Technically, you'd need three or just two if you control the first digit of all four rows with something else like the aforementioned '595.

I mean, can't I program each of the 4 PICs to refresh its 5 digits, while the main MC just sends the data to be display on each row?
Yes, this could work. Or maybe one PIC with enough I/O's to control all 20 digits. The caveat is programming and timing the duty cycle and being able to ensure the displays will be bright enough. When multiplexing, you usually have to send more current to each segment to maintain the same level of brightness than if you were powering them constantly. Of course, the more pins you have to multiplex, the less time you'll have to give each segment power and more current you'll need, so perhaps using four PIC's instead of one would be safer. You also have to take into account how much current a PIC pin can output since you'll need more when multiplexing. Someone who's done this before may be able to explain this better. Actually, take a look at MMcLaren's PIC clock.

Another thought occurred to me. You could use an I/O port expander such as this. It has 16 I/O's and is available from Digikey for less than $1.50 USD in single-piece quantities. It uses I2C, so you could use these in same manner you describe above without having to program five uC's.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Technically, you'd need three or just two if you control the first digit of all four rows with something else like the aforementioned '595.

Yes, this could work. Or maybe one PIC with enough I/O's to control all 20 digits. The caveat is programming and timing the duty cycle and being able to ensure the displays will be bright enough. When multiplexing, you usually have to send more current to each segment to maintain the same level of brightness than if you were powering them constantly. Of course, the more pins you have to multiplex, the less time you'll have to give each segment power and more current you'll need, so perhaps using four PIC's instead of one would be safer. You also have to take into account how much current a PIC pin can output since you'll need more when multiplexing. Someone who's done this before may be able to explain this better. Actually, take a look at MMcLaren's PIC clock.

Another thought occurred to me. You could use an I/O port expander such as this. It has 16 I/O's and is available from Digikey for less than $1.50 USD in single-piece quantities. It uses I2C, so you could use these in same manner you describe above without having to program five uC's.
One will not do; I've tried already in all possible ways I could figure out. The duty cycle is just too small to see the digits clearly; even with individual transistors supplying 5V directly to each segment without any resistor. The brightness is too dim. The minimum necessary to start seeing the digits clearly is a refresh of just 10 digits -for which I would need 2 ICs (one for each 10)-; but it looks perfect if each just refreshes 5, needing 4 ICs.

At the moment I'm using 8 data pins; which are shared by all 20 digits (well, 15 digits are virtual -I'm running a 20 digits cycle with just 5 physical 7-sement displays until the rest arrive). If I were to increase the number of I/O pins, I would need to double the output pins to 16, each bus of 8 would have to refresh 10 digits; which would be just the minimum visible -though I really prefer if it looks good-. So, to get a good performance, I would need 32 output pins (8 per 5 digit block). Not sure it's practical.

I think I'm stuck with using an IC for each block of 5; it's not as bad as using one IC per digit, and the duty cycle would be perfect in terms of brightness. What I don't like is the idea of paying almost $12 for each MAX721; so if I can get 4 of those cheap PICs with another one controlling them it would be great. Or maybe it would be just better to simply get the four TPIC6C595 for $1.20 each.
 
Last edited:

RichardO

Joined May 4, 2013
2,270
I think I'm stuck with using an IC for each block of 5;
This is what I would do. The big advantage is that you can build four 5-digit modules that are all the same. It is easier to debug a 5-digit module than one big 20 digit module. Once the 5-digit module works you just build more like it. Later, if one 5-digit module goes bad, you just replace that one module.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
This is what I would do. The big advantage is that you can build four 5-digit modules that are all the same. It is easier to debug a 5-digit module than one big 20 digit module. Once the 5-digit module works you just build more like it. Later, if one 5-digit module goes bad, you just replace that one module.
Yes; that's a good point.

I'm also starting to think MMLaren's suggestion about using 4 TPIC6C595 is also far better than going through all the trouble of designing, coding, and debugging the 4 PICs just to save half a dollar on each IC.
 

massimj

Joined May 5, 2013
14
Have you looked for a good Ebay price on the PCF8574 ? If you buy 10 or 20 of them, they can get pretty cheap.

1 FEATURES
• Operating supply voltage 2.5 to 6 V
• Low standby current consumption of 10 µA maximum
• I
2C-bus to parallel port expander
• Open-drain interrupt output
• 8-bit remote I/O port for the I2C-bus
• Compatible with most microcontrollers
• Latched outputs with high current drive capability for
directly driving LEDs
• Address by 3 hardware address pins for use of up to
8 devices (up to 16 with PCF8574A)
• DIP16, or space-saving SO16 or SSOP20 packages.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Have you looked for a good Ebay price on the PCF8574 ? If you buy 10 or 20 of them, they can get pretty cheap.

1 FEATURES
• Operating supply voltage 2.5 to 6 V
• Low standby current consumption of 10 µA maximum
• I
2C-bus to parallel port expander
• Open-drain interrupt output
• 8-bit remote I/O port for the I2C-bus
• Compatible with most microcontrollers
• Latched outputs with high current drive capability for
directly driving LEDs
• Address by 3 hardware address pins for use of up to
8 devices (up to 16 with PCF8574A)
• DIP16, or space-saving SO16 or SSOP20 packages.
I haven't been working on the display lately, as I got more than I can chew with the PICs; but I just looked on ebay and units are around half price of the TPIC6C595.
 
Top