News:

Let's find out together what makes a PIC Tick!

Main Menu

multiple 7 segment displays

Started by Peter Truman, Today at 03:24 AM

Previous topic - Next topic

Peter Truman

Hi All - I have a new project which requires I use small 7 segment led displays. The project has 2 forms, form 1 requires 4 sets of 4 digit displays and for 2 requires 8 sets.

So - each display board has 4 x 7 segment displays (8 if you count the dp) plus 3 discrete indicator led's

Each set will be built on a 'plug in' PCB on a main PCB that has a number of M12 PBC mount sockets - there will be a main PIC on the base board that will handle a range of sensing tasks, plus a rotary encoder / menu system.

I'm thinking about how best to drive my 4 digit displays - Each digit will be multiplexed and strobed to display the necessary data.

I've not really been able to identify a low cost IC to handle this for me (Max7219 is A$26 bucks!)

My thinking now is I could use a PCA9535 I/O expander to handle the digits. The main board PIC will fire off an I2C packet to each display board in turn (max 8 display boards) - that would mean the main PIC is pretty busy servicing all 8 I2C signals fast enough to strobe each display. I don't think that approach is going to cut the mustard!

I'm going around in circles a bit with this - now thinking I should add a low cost PIC on each display board - I would just have my main PIC fire off a serial packet (probably SPI) - the PIC on the display board will pick up the packet and then handle the strobing independent of the main board.

Next - it occurs to me - if I'm going to have a PIC on the display board - and all it has to do is handle the 7 segment displays, why not use a higher pin count PIC and do away with the port expander?

I decided I would post the question here and see what more experienced people would suggest!

Many thanks in anticipation

kcsl

Well, hardware costs money, takes board space, increases power requirements and typically pushes up development time, so I always try and reduce the hardware as much as possible. There's also fewer points of failure so less to go wrong.

Most of the time, I can afford the CPU cycles to drive the display via an interrupt routine. But on the odd occasion where I can't, I create a chain of 74HC595's (which have sufficient outputs to drive the 8 segments). You can drive the entire chain with 4 or 5 output pins and you don't get dimming due the multiplexing. The IC's are cheap and easily available. I also like this approach because you can drive any number of digits.
The additional 3 indicator LEDs could be driven by another 595 or just 3 PIC output pins.

Regards,
Joe
There's no room for optimism in software or hardware engineering.

shantanu@india

Hi,
The best way to drive 7-segment common-anode display modules are through 4094 8-way shift registers which can sink current. Reduce the common anode voltage by 1/2 diodes so that you do not need any current limiting resistance between the 4094 outputs & the 7-segment LED. 'Strobe" & "Clock" signals are common & the 4094's are cascaded by data pin. Just 3 pins of the microcontroller are required.
Regards
Shantanu