2

How can I connect this type of 7 segment display to cascading register like 74HC595? I know I can use 7219, but at the moment I have those cheap registers and would like to see if it's possible.

Not looking for MCU scanning solution!

enter image description here

The problem for me is that segments are interconnected... What is the simple way to connect?

enter image description here

UPDATE:

I've found the following in google. Is it close to what I am trying to achieve? There is only 1 shift register instead of 4 though.

enter image description here

UPDATE 3:

Enlarge enter image description here

Pablo
  • 1,561
  • 3
  • 21
  • 42
  • The update works as the ATTiny provides the data to the register. It will need to continuously send the data to the register though, on each clock pulse tied into OH. And due to the way the register works, you need to pulse OH as the counter CLK latches on the low-to-high transition. So send Digit1+OH Low, Digit2+OH High, Digit2+OH Low, D3+OH High, D3+OH low, D4+OH High, D4+OH Low, D1+OH High, repeat. You also need to set up the attiny to receive data from your main arduino, as a i2c/spi/serial data slave. – Passerby Jan 10 '13 at 22:45
  • @Passerby: so this is not completely what I want, it will be again scanning by main MCU or using different MCU for scanning. I need to keep the data in 4 respective registers, then push it to LED one at a time. But how... – Pablo Jan 10 '13 at 22:47
  • That's the thing. The scanning has to be done, but it can be done by your main Arduino, a dedicated attiny + 1 register + counter, or 4 registers + 555 timer + Decade Counter. Or 4 registers + attiny acting as the 555/decade counter combination. Or a dedicated Driver IC. When I said that the data has to be sent over and over again with 1 register, that means the attiny handles all of that. The main arduino only sends out the data once until it needs to change. – Passerby Jan 10 '13 at 22:54
  • @Passerby: Let's stop by 4 registers + 555 timer + Decade Counter please. It's ideal for me if I can only know how to make the scanning part and understand connections. – Pablo Jan 10 '13 at 23:01
  • In that case, you just need to combine the three schematics. Shift registers to arduino and leds as in the 1st schematic. Output of decade counter to transistors as the 2nd schematic AND to the OE pins (these will need inverting). 555 as shown in the schematic I posted. If you need help I can try making a schematic in a few hours. – Passerby Jan 10 '13 at 23:08
  • @Passerby: I don't want to abuse your time so I will try to make first from what I understand, post it here then would ask you to check. Many thanks. – Pablo Jan 10 '13 at 23:16
  • @Passerby: I've updated my post. – Pablo Jan 11 '13 at 00:07
  • I think you are close with update 2. I do believe that you should connect the transistor bases to the outputs of the three inverters, though. Then each of the transistors will be on only when the corresponding shift regiter is enabled. The PNP will turn on when the base is pulled low to forward bais the transistor, and the regsiter outputs will be enabled when the enable pin is pulled low. You can safely connect the outputs together, as your circuit only enables one shift register at a time. – B Pete Jan 11 '13 at 01:08
  • That is great. 3 things: 1, as @BPete said, you need NPN, not PNP transistors for the display. Only one output on the Counter is logic high, so with PNPs, two displays will be on at the same time, not what you need. 2, you can use a simple inverting transistor circuit instead of using an inverter ic, for the OE pins (see updated answer). and 3, unless your display has built in resistors, you should add those between the display and common connection points. Last, the 4022 is a 8 bit version of the 10 bit 4017, works the same way. – Passerby Jan 11 '13 at 04:49
  • @Passerby, @B Pete : I've updated circuit diagram. Could you please check if R values are acceptable? – Pablo Jan 11 '13 at 12:38
  • The r values should be good, but by placing the display resistors on the common anode side, you might get some brightness issues when less leds are lit than others (A 1 will be brighter than a 8 being displayed). – Passerby Jan 11 '13 at 18:57
  • @Passerby: thanks. Does it look perfect now? ) – Pablo Jan 11 '13 at 19:02
  • Yep, you should be all good. – Passerby Jan 11 '13 at 19:22

4 Answers4

4

It can be done with the 74HC595, but you will need an extra chip or ic. You will need to drive both the common anode for each display, and the OE (OUTPUT ENABLE) pin on each shift register at a separate time. The OE pin allows you to disconnect the output pins without clearing the shift register. Creative use of this allows pwm, or in this case, by cycling through through a digit/shift register pair, allows you to implement scanning.

The easiest way to do this would be a 555 timer driving a decade counter (or ring counter). The 555 would provide a clock signal, while the decade counter loops through the four shift register OE pins.

555 Decade Counter

Can't be done without scanning. Especially not with a simple shift register. Not without cutting open the display and somehow wiring individual cathodes for each digit. Those multidigit displays are designed for scanning in order to save on pins. It sacrifices software efficiency for hardware resource reduction.

What you need is a LED Display Driver ic, like the MAX6965 LED Driver with PWM Intensity Control (I2C) or ICM7211, ICM7212 Four Digit Display Decoder/Drivers (Shift Register like) (Of course, check datasheets first before you buy. You need a common-anode driver)

Siemens provides a detailed appnote on how to interface to 7segment displays Drivers For Light Emitting Displays Appnote 24 including a list of drivers suited for this.

The other option is to take a second microcontroller like a attiny and make your own driver, implementing it's own scanning so the main arduino doesn't need to do it.

Inverting Transistor setup. Uses a weak pull-up to disable OE pin when the base has no current, pulls to ground when the base has a current. Inverted NPN

Passerby
  • 73,027
  • 7
  • 93
  • 209
  • How about using some logic IC (not sure about name), which will shift 1 to the next pin each input clock? Then I can use 555 timer to scan digits. – Pablo Jan 10 '13 at 21:36
  • @Pablo actually, I'm updating my answer. Give me 2 minutes. – Passerby Jan 10 '13 at 21:52
  • sure. just hope you understand what logic IC I mean. It's just shifting 1 bit through pins. I had that in my childhood :) – Pablo Jan 10 '13 at 21:53
  • I feel like that has to be a way we can do this with a few buffers and a 555 timer. Or you could buy a display that matches! – Kortuk Jan 10 '13 at 22:02
  • @Kortuk: I really can't find the display that matches in the local market. Either anodes or cathodes are common. Ordering one from abroad imposes some difficulties. Looking forward to find solution with simple components like 555. I mean if it get's too complex of course I would consider other ways, but hope someone can suggest simple circuit. – Pablo Jan 10 '13 at 22:05
  • @Pablo I bet Passerby can, there is no reason that you cant have multiple shift registers and switch between a mux if needed, it just takes more hardware. – Kortuk Jan 10 '13 at 22:08
  • @Passerby: thanks, I think we are getting close. If I control OE from decade counter, would it collide with my serial input? I mean when the serial data comes in, OE will not let the data to load? So I will have 4(or 3) separate 74HC595 registers, but still not certain how I will connect DIGIT pins and segment pins... Also, could you recommend decade counter which I can configure for 3 or 4 bits? – Pablo Jan 10 '13 at 22:18
  • @Passerby: please also see my update. – Pablo Jan 10 '13 at 22:32
  • The OE pin is separate from the CLR pin. OE only affects whether or not the outputs are on/off, the rest of the shift register still works. It's the CLR pin that prevents the register from working. You should still be able to clock in data and latch the register regardless of the OE pin. As for the decade counter, like the 4017, you can tie one of the outputs to the reset pin. 0 - 3 to each register, output 4 to the reset pin, so there is 5 clock pulses from the 555 for a full cycle. You just need to account for that in the 555 clock timing. – Passerby Jan 10 '13 at 22:33
0

May I point out that if there is a common anode/cathode for each digit and all segments have the same pins like almost every multi-digit display, there is no way to avoid scanning. If each digit is separate digit and has its own set of segments and the segments are not tied together, then you could use a shift register for each digit and cascade them without scanning as you want.

A long time ago I remember a special BCD encoded LED display that you sent it the actual BCD of the digit and it took care of the rest. But I could not tell you if they are even still manufactured or even if they have multi-digit versions.

I think your best bet is either have an ATTiny receive the data and take care of the display with either single digit/shift registers pair per digit (no scanning) or just use 2 shift registers with the multi-digit display (scanning which you cannot avoid).

DMilton2004
  • 41
  • 1
  • 1
  • 2
0

They are assuming you would only have one of the 7-segments sections powered at once. You will need to sequence through powering the 3 sections fast enough they all appear to be on at once.

Your circuit for shifting appears good.

Brian Carlton
  • 13,312
  • 5
  • 44
  • 65
  • I can't use scanning, it's really resource hog for tiny and busy MCU and requires additional pins. I specifically mentioned cascading so I can set once and forget. – Pablo Jan 10 '13 at 21:17
0

I've written a tutorial on the theory behind cascading the 74HC595 for a clock. I am not entirely clear how you are driving the 7-seg displays, but it should be helpful in explaining how to get a desired output from the chip. From this you can wire it appropriately to your driving mechanism.

:edit: Looking at your circuit, since you are required to multiplex, perhaps you can use 3 more bits on the registers to drive the anode of each digit. Seems like you could just use two registers cascaded, one for the eight cathodes and one for 3 anodes.

Michael
  • 397
  • 1
  • 9
  • With 1 register on segments it's impossible to save data for 3-4 digits. – Pablo Jan 11 '13 at 09:13
  • I see. So then you would need to use the OE pin on each registers if you want to have the numbers being saved. It looks like Passerby has that all covered... – Michael Jan 11 '13 at 14:50