0
\$\begingroup\$

I'm building a circuit containing 8 switches representing 8 bits in a byte. I have two single digit 7 segment displays to display the two hexadecimal characters that represent the byte value. I'm quite familiar with using 74HC595 shift registers to drive a segment display, having one register to control the segments and one to control the common cathodes.

I figured that since there is no need for a decimal point in hexadecimal values, I can leave out the second shift register and use the 8th output pin that would otherwise control the Dp segment, to toggle between the two displays.

I've come up with this circuit (left out irrelevant parts) enter image description here

I know it's more of a hypothetical problem, but I know there is a delay between the moment Q1 switches on and Q2 switches off, since Q3 needs to switch too. I tried the following:

  • Connect the Dp output pin of the shift register to Q3's base. Q1 was connected with Q3's emitter and Q2 to Q3's collector. This made both displays either on or off (which I could not figure out why)
  • Leave out Q3 and connect segment1's cathode with Q2's base. This lights up segment2 very dim when segment1 is on, while segment1 is off when segment2 is on (that must have something to do with segment2 not providing base current to Q1 I suppose?)

Is there a way to switch only one of the displays on at the same time with the same number of transistors for both cathodes? (I can take "no" for an answer)

\$\endgroup\$
1
\$\begingroup\$

You can simply bring the segment outputs low, switch the digit, wait a bit for the cathode drivers to settle if necessary (a couple microseconds is probably enough) then correct the segment outputs for that digit. That will eliminate "ghosting".

With the HC595 that means more bytes being shifted out.

You should use 7 resistors not one. One in series with each segment output, and lose the 470 ohm resistors.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Ah, I see. I should shiftOut() twice, first setting the segment outputs low, then switching the cathode bit (and then setting the correct segment outputs again) rather than changing both segments and cathode at the same time. Also thanks for the reminder of the resistors. \$\endgroup\$ – gatukok Apr 11 at 9:37
0
\$\begingroup\$

Here's a much better part for this job: the TLC5928. It has internal current setting, and can drive 16 LEDs directly so you don't need to multiplex, nor do you need serial resistors. It works the same as the '595, and yes you could multiplex it if that's what you want.

Here's a cheaper, non current-setting one that's 8 channels. You will need resistors.

Another way is to use an I2C expander if your host has I2C capability.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thank you for the suggested ICs. I might give it a try if Sphere Pefhany's answer doesn't work \$\endgroup\$ – gatukok Apr 11 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.