January 16, 200422 yr If I look for example at the FSBUS project, by doing basic current computations, theoricaly I would burst my PIC as soon as I plug it in... I'm sure I'm getting it wrong cause it is working for many of you but I just want to understand..So in the schematic we have 5 volts 1 led (analysing on 1 segment only) and 1 100ohms resistor.Draw current is fixed by the resistor : U = RI (5 - 0.6) = 100 x I I = 4.2 / 100 = 42mAwell well... PIC I/O are limited to 25mA... what's wrong doc ?Ok I could agree on the PIC driving each segments on its pins but driving as well the Common cathode directly from port A !! This is one pin delivering current for all segments !! (in my example above that would be : 42mA x 8 Segments = 336mAAnybody can help ?
January 16, 200422 yr Hi,The pic is not limited to 25mA. If you look at the PIC16F84A datasheet you will find that PORTB is limited to 150mA and that PORTA is limited to 80mA.And the current is not fixed by the resistor. The segment is like a diode (simple light emiting diode) and if you think as a series connection the diode current will be given by: I=Is * exp(V/n*Vt), where I is the current driven, the Is is the saturation current, V is the voltage applied, n is the ideality factor and Vt is the voltage due to the minority carries of charge at a given temperature (usually 25 mV). You will find that the current is a little different if you think this way.And also the common cathode works as an on switch and to drive all the displays with the same pins they must work like strobe lights. Actually it has an update frequency higher then your vision update frequency. You can see that when you connect it directly to a power source the light seems brighter.CaduProjeto A320http://www.projetoa320.cjb.net
January 16, 200422 yr I haven't looked at the 16F84, but the others (eg. 16F628) I've looked at stated that you have 25mA per pin,sink or source, and 200mA per port (8x25mA). Another limit on the PICs is current in/out of the supply pins Vdd/Vss.Here, the 628 allows 250mA into Vdd (positive supply), and 300mA out of Vss (GND).There's also a "total Power dissipation" but that is device specific.Assume you wanted to use 16 pins (from two ports) driving (eg sinking) an external load with 25mA per pin... that would be out of spec... although both ports would be fine with it, the total current through Vss and Vdd is out of spec.If you had 8 pins sinking, 8 pins sourcing, it would be ok, since the loads would cancel out.As for the LED voltage and currents:the givens are Uf (LED forward voltage), If (LED forward current) and supply voltage (5 Volts usually).Uf and If can be found in data sheets.For example: I have 7segment displays, common cathode. The datasheet says that at If=20mA, (typical) Uf is 1.85V.Now I want to know what resistor I need to run my displays at these specs (and 5V supply voltage):U-Uf = 5V - 1.85V = 3.15VSo our resistor has to drop 3.15V:R= U/I = 3.15V / 20mA = 157.5 Ohms.Another note: You said you studied the FSBus stuff: I think FSBus multiplexes the 7 segment displays.That means that each digit is lit up only for a short time, then the next, ... (they are blinking, but at a very high rate, which makes it look continous for human eyes. Howvever, the displays appear less bright than non-multiplexed ones, so in order to increase the brightness,the current is increased. Thus the resistors are made smaller :-)Manuel
Create an account or sign in to comment