Andre Miller wrote: > > Hi, > > For the display of my project I'm using four seven segment displays (common > anode), using 8 IO pins for the segments, and another 4 to drive the > individual displays. The four displays are driven through a BC557 transistor > (with a 1K resistor on the gate), and each segment is connected to an IO pin > through a 330 Ohm resistor (all segments are common to all displays, going > through the same resistor. I hope this is all clear :-) > > To drive the displays I repeat the following via a timer interrupt > (Prescaler set to 1:1, 8 bit timer, 4 Mhz clock): > > 1) Turn on display X, turn off all other displays > 2) Set the correct segments for display X > 3) Add one to X > 4) If (X > 4), set X = 1 > > So each time the ISR executes it turns on the next display, etc. > > Problem is, the segments on the displays are very dim if I do this. If I > only have one display on, then it is the correct brightness. This is > understandable since each display is only on for 1/4 of the time now. I was > thinking maybe I could just use a quarter of the value resistor instead > (replace 330 Ohm with 100 Ohm, for example). But then, won't it draw too > much current even if its only for a fraction of second, or will it all > average out? Also, if something happens which cause the pic to stop > multiplexing the displays, there is the possibility of only one display > being on for a long period of time (clocking stops, transistor failure, > etc). > > Any suggestions on how to overcome this? > > ________________________________ If you have the time to spare, leave the leds on for a while, few mS, then switch to the next segment, and so on. In other words, increase the "on" time compared to the off time. Only works if your chip hasn't much else to do. regards Howard. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads