What's better for more I/O: bigger MCU or extra chips?

What's better for more I/O: bigger MCU or extra chips?

  • Use 40 pin MCU so 11 pins can drive 4x7seg LED

    Votes: 0 0.0%
  • Use 28 pin MCU + extra shift register chip

    Votes: 0 0.0%

  • Total voters
    0
  • Poll closed .

Thread Starter

DougRRogers

Joined May 7, 2012
3
I need to know the general philosophy of whether it's better to use a smaller pin count MCU along with two extra 74HC595's to drive a 4x7seg LED, plus 7 other outputs; or else use a larger MCU just to get more output pins so that, for example, the 4x7 seg LED can be run directly using 11 output pins (7 for the segments + 4 to address each LED) and 7 more pins can be used for the other outputs.

It seems pretty standard procedure to use a shift register for 7 segment LEDs rather than using 7 output pins for that purpose, but my electronics professor says the most important thing is to reduce the number of chips on the PC board, so I should use a bigger MCU in order to eliminate the extra chips.

I'm using an Arduino UNO with a 28 pin ATMega328, but if I go to a 40 pin MCU I'll have to abandon the Arduino development board, software, etc. that I'm used to using. If it's really the best thing to do I'll do that (reluctantly) but is it really worth using a bigger MCU chip (costing a couple dollars more vs. the price of two cheap 74HC595s) to get all those extra pins? Plus, it seems kind of crude to hog up 11 output pins just to run a 4x7 LED...

NOTE: We plan to make hundreds of copies of the final product, so this is more than just a one-off circuit. ie. chip count vs. MCU size could be a significant issue when multiplied by hundreds.

- Doug Rogers
 

MrChips

Joined Oct 2, 2009
30,807
There are more than one ways to skin a cat.

You can buy 4x7 seg LED modules that have built-in BCD-to-seven-segment decoder.
Hence you can use an auxiliary MCU to drive the module using 4 pins to select the digit and 4 pins for BCD output.

Failing that, you would need 4 select pins and 7 segment pins. Use a second MCU for that and use SPI or SCI lines from the ATmega328 to the second MCU. If you want to preserve the SCI function for something else all you would need is a single output pin with bit-banging software which is easy to write.

Finally, if you are thinking of volume production, a single ATmega328 in a 32-pin TQFP package is the way to go (or similar MCU).

My choice would be a single SMD package to get the job done.
 

Thread Starter

DougRRogers

Joined May 7, 2012
3
Thanks Mr. Chips,
It seems the bottom line is that you feel it's better to avoid having extra chips, and therefore get an MCU with more pins. I guess since the extra pin versions are about the same price there's no good reason not to. It just seems weird to me that since 7 seg displays are so common it means seven valuable MCU I/O ports would often be gobbled up for such a simple function. It doesn't feel like an elegant solution, but may be the most practical one.

One related question: if all seven segments are lit, that would require at least 7*10=70 mA through the common cathode or anode. I suspect an MCU output pin couldn't safely provide this, correct? So I guess the MCU pin would actually have to switch a transistor rather than connecting directly to the digit selection pins on the display?

- Doug
 

MMcLaren

Joined Feb 14, 2010
861
Your professor has a good point. There are times however when adding a support or 'glue' chip makes sense in a design. That said, if you can use 2-digit, 3-digit, or 4-digit displays with discrete pinouts in your design instead of their multiplexed counterparts, Charlieplexing a small display might make sense and save you some valuable I/O pins.



If you need to drive lots of displays it might make sense to use driver ICs to increase performance and brightness and reduce the number of I/O pins required on the host mcu. My MacMux method multiplexes the displays and the column driver lines to reduce I/O overhead. Basically, MacMux re-tasks the column driver lines for use as <clk> and <dat> lines to load the driver IC shift registers in parallel (bit-banged parallel SPI) during a small blanking interval at the beginning of each column refresh interval. Using a PWM signal from the mcu for the </oe> and <lat> pins on the driver ICs allows for complete "no overhead" fade-to-black PWM brightness control. This is just one of several methods that might make sense for some designs.



Good luck with your assignment.

Cheerful regards, Mike
 

Attachments

Last edited:

Thread Starter

DougRRogers

Joined May 7, 2012
3
Thanks so much for your very detailed responses! I'm new to this site and this was my first posting. I am stunned at the level of responses - prompt, detailed, and high quality! The jury is still out on my original question though, since about half the designs involve using 74595's and half use an MCU with lots of pins! Very helpful though. I think I'll go with a larger MCU just for the extra ports so I can drive my LED's without shift registers.
 
Top