7 segment

Saeedk9574

New Member
Hi everyone
I am using a common anode 4 digit 7 segment to show the time, but the problem is whenever I increase voltage above 3.8v All LEDs of the 7 segments gets lighted up and the correct number can not be seen
I have connected the common pins (A-G) of 7 segments to the PNP transistor, and the common pins connected to 300-ohm resistor.
 


I used this diagram. However, I chose BC640 transistor and 1K resistor for base. It works well below 3.8v, but as soon as I increase it above 3.8 changes to this.

 
If you change the multiplexing frequency to about 1 hZ do you see the individual digites displayed in sequence and are all of the digits displayed correctly ? (Or look at the segnals to the LEDs with an oscilloscope if you have.)
Check that you have not reversed the collector and emitter connections to the transistors.

Les.
 
I have connected the common pins (A-G) of 7 segments to the PNP transistor
Did you say this incorrectly or is your schematic wrong? Because, this line doesn't make sense that you have A-G connected to the PNP (not shown that way in the schematic).


Also, a PNP must be pulled high to turn it off (low to turn it on). You should have only one of your PNP bases in a low-state at a time for proper multiplexing.
 
In round numbers, with a 5 V supply each PIC output is trying to sink around 30 mA. IIRC, too much. There is a limit to the max continuous current for each I/O pin and another limit to the total GND current for the chip.

Increase the segment resistors to 470 ohms each and see if things work correctly. It will be much dimmer, but once things are working you can decrease them for increased brightness. Without drilling down into the datasheet, keep the segment resistors above 220 ohms.

ak
 
Good catch. That chip has max I/O current of 25mA.
 

It's almost certain that it wouldn't cause all the segments to be lit though - in fact I wouldn't ever consider that possibility.

It's not 'nice' but the PIC will simply limit the current itself - by all means though, increase the limiting resistors to a more sensible value.

But it would be more plausible that it's because the base/emitter resistors are missing, or/and a coding error.
 
Have you simulated the circuit in proteus or any other simulation software? If yes, what do you see in the simulation? As somebody has already said, You must have only one of your PNP bases in a low-state at a time for proper multiplexing. You can review the part of your code where you're controlling this scanning time.
 
If you set port D low and just cycle the PNP you should see each digit light in sequence - slow down the multiplex speed as suggested by Les.

Mike.
 
If you set port D low and just cycle the PNP you should see each digit light in sequence - slow down the multiplex speed as suggested by Les.

Mike.
Exactly, slow it right down - once per second is good, as you can then actually measure things using a multimeter.
 
Yes, you're right. that was type mistake.
 
Thank you, I will try it.
 
No, I have not. However, most of the time I can not work with proteus, but I will try it in.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…