> From: Byron A Jeff > > > If we allow for 10mA through each LED the common pin has to source and sink > > 40mA. According to the 16C5X data sheet in front of me the specification is > > sink 25mA and source 20mA. In addition to which there are limits on total > > currents for each port, and for the total device. > > I'd pull the full 20ma through the currently activated LED.. It's only one > LED, not all 6 that turn on at once so there's no need to limit the current to > 10 ma > > > > One way around this is to use the common pin to drive a pair of transistors > > but that increases the part count and we are still faced with a 40mA per > > port limitation. Perhaps someone has a better solution. > > Correct. If brightness is a real problem (and in this application it isn't) > then each port pin would have to drive a transistor pair. But that raises > the next question: Can a transistor pair be tri-stated? If so how would you > do it? > A transistor buffer can be tristated using only one output port, providing that the output leakage is insufficient to bias either transistor. In the case of leakage, beware that the following circuit divides the output impedance by the transistor beta (approximately). Vcc / -------|NPN | \ port -----| +---- out | / --------|PNP \ GND (Geez I hate ascii graphics). The emitters are tied together. The output follows the state of the port (High, Low or hi-Z). The only problem is that to output is no longer that good old rail-to-rail CMOS swing. Instead, the output falls short of the supply by one Vbe. (about 0.6V). The available current is the port current times the transistor beta; in practise limited by the allowable transistor collector current - approx 500mA. One question I have is whether the datasheet limitations for port current may be exceeded if a reduced duty cycle is used. E.g. for continuous operation 25mA is OK, is 100mA OK for 25% duty cycle? My guess is probably not due to excessive voltage drop in the output drivers due to FET channel resistance, however it would be interesting to experiment. Regards, SJH Canberra, Australia