Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/27/08 03:49
Modified:
  12/27/08 04:17

Read: times


 
#161151 - It works like this....
Responding to: ???'s previous message
1) When one of the port pins that controls the upper PNP transistor goes to a low level it turns on the PNP and allows the VCC supply to connect to the anodes of one bank of the LED segments. This transistor should be able to fully saturate in this condition where collector will be maybe 0.15 to 0.25 volts below the Vcc level. (Others here have suggested that such saturated transistor will have 0.68 or more volts across it but this will not be the case unless you are trying to conduct current from emitter to collector at a very high level compared to the available base current). Setting the base connected port pin to a high level will cause the PNP anode driver transistor to turn off.

In normal display operation you would drive the two PNP base connections in an alternate manner so as to have one on with the other off and so forth. It is a good idea to set both PNPs off for a short while during the alternate drive condition change over. It is typical to try to drive the two PNPs at close to 50 percent duty cycle.

2) When one of the port pins that controls the lower NPN transistors goes to a high level it allows base current into the NPN transistor. This allows it to turn on and conduct current from its collector to ground at the emitter. In the circuit shown the NPN should be able to saturate such that the collector will pulldown to a voltage just 0.15 to 0.25 volts above the ground level. (Others here have suggested that such saturated transistor will have 0.68 or more volts across it but this will not be the case unless you are trying to conduct current from collector to emitter at a very high level compared to the available base current). When the port pin that connects into the NPN base is pulled low then the NPN transistor turns off. These lower NPN transistors are normally required to allow higher current to be conducted through the segments that what would normally be considered acceptable current for an 8051 port pin to sink to ground.

In normal operation one would apply up to 12 high levels to the NPN bases to select which segment LEDs in the current common anode set to turn on. These would stay applied until the end of the period that that common anode PNP is turned on. When the drive to the PNP anode drives is toggled then the 12-bit select code to the NPN transistors would be switched to the desired set of segments in the alternate common anode set.

Multiplexing the display in this manner to give the appearance of all segments working in the full display mode can be done by causing the PNP anode drivers to alternate at a rate of at least 100 to 300 Hz or so. The segment selects on the NPNs is changed at the same rate back and forth between the first 12 and second 12 desired segments set. It can be really convenient to setup the MCU software to determine the proper bit pattern for the two 12-bit segment selects and save those into a few internal memory variables. Then program a timer interrupt to occur repeatatively at some interval between 3 to 10 milliseconds. In the timer interrupt service routine the code you supply can select the proper alternate PNP anode driver and then apply the corresponding 12-bit segment select code. Another internal memory variable can have a single bit used to indicate which of the PNP anode drivers is currently selected. This bit variable can be toggled at each interrupt time.

In the circuit I posted you adjust the LED segment brightness by adjusting the value of the resistors that are in series with the collector of each NPN transistor. During operation if you observe that the transistor is not saturating to say less than 0.3V across the NPN transistor then it may be necessary to lower the value of the resistors that are in series with the NPN transistor bases. There will be a point of diminishing returns on the adjustment NPN base resistors when a conventional 8051 MCU type of port pin is used in the output high state because of the intrinsically high internal pullup resistor inside the port pin structure. If this ends up being a problem you may have to add a pullup resistor of say 4.7K ohms at each of the 12 NPN driver signals. I have modified the original diagram I posted to show these additional pullups if needed.

If during operation with one PNP transistor driving the anode of up to 12 LED segments all lit at the same time causes the PNP collector to emitter voltage drop to exceed say about 0.3V it may be necessary to lower the PNP series base resistors some allow for some more base current.

Here is a link to the modified connection diagram showing the additional pullups on the NPN base connections. Note that in the normal 8051 type MCU one of the ports has no internal pullups and in that case these shown addiitonal pullups are required anyway.

Michael Karas


List of 40 messages in thread
TopicAuthorDate
Help with 4 digit LED 7 segment display            01/01/70 00:00      
   common cathode            01/01/70 00:00      
   Maybe it is a standard display            01/01/70 00:00      
      It's standard, but I can't find a spec sheet            01/01/70 00:00      
         an old-time part, perhaps?            01/01/70 00:00      
            The 8650 is a standard alarm clock IC            01/01/70 00:00      
               add up the forward voltages, adjust the resistors ...            01/01/70 00:00      
                  Diagram            01/01/70 00:00      
                     It's all up to you ...            01/01/70 00:00      
                        Too soon to start worrying about voltage            01/01/70 00:00      
                           Be careful ... you only have one of these ... right?            01/01/70 00:00      
                     beware            01/01/70 00:00      
                        Interesting concept            01/01/70 00:00      
                        Don't think so            01/01/70 00:00      
                           make a FULL schematic            01/01/70 00:00      
                              Of course            01/01/70 00:00      
                           Careful, now!            01/01/70 00:00      
                     Diagram mis-labeled, sorry            01/01/70 00:00      
   Please consider that....            01/01/70 00:00      
      Lookup table            01/01/70 00:00      
         'Ohm" it out            01/01/70 00:00      
            I don't see how            01/01/70 00:00      
               then forget transistors            01/01/70 00:00      
         2-Anode 12-Cathode Drive Diagram            01/01/70 00:00      
            Thanks            01/01/70 00:00      
   It works like this....            01/01/70 00:00      
      Vbe, not Vce            01/01/70 00:00      
         that was probably I who did that ... and you're right            01/01/70 00:00      
            Well...            01/01/70 00:00      
               take a close look            01/01/70 00:00      
               I doubt it            01/01/70 00:00      
                  Possibly a radio section too            01/01/70 00:00      
                  Crystals            01/01/70 00:00      
                     That C### is a capacitor number, I think            01/01/70 00:00      
      How about this?            01/01/70 00:00      
         use PNP at the high side            01/01/70 00:00      
         ...And get rid of the extra resistor in the...            01/01/70 00:00      
            Thanks. Time to test and draw            01/01/70 00:00      
               multimeter solution            01/01/70 00:00      
                  Similar to what I did            01/01/70 00:00      

Back to Subject List