> At the risk of appearing stupid, since I didn't look at the datasheet first, Now that I've appeared stupid and having now read the datasheet, know it. ;-) I now see that the maximum allowable sourced current from PORTC and PORTD combined is a hearty 200ma (source or sink). The maximum for any individual pin is 25ma (source or sink). The max (source current) for the whole device is 250ma, the sink max is 300ma. It would seem that you are well within specs to drive 8 LED's from PORTD(unless your running a refrigerator or arc-welder off the other ports). Man I didn't know that you could run that much juice thru em'. ;-) I will now crawl back into a shell and wait for the flames to start. ;-) michael brown > it looks like you would be trying to exceed the maximum current capability > of the port (whole device?). The resistors (not considering LED on > resistance) would *consume* 5 milliamps. The maximum output rating > (sourcing current) of the port (entire device?) is probably around 25 > milliamps. Therefore, trying to light more than 4 (5 * 5ma = 25ma) at a > time could result in this type of behavior. > > That's my best guess for now. I would suggest two things: > > 1) read the datasheet and find out what is legal > > 2) turn your led's around and connect them to Vss(Vcc). Now write zero's to > the port to turn them on. Most CMOS type devices can "sink" more current > than they can "source". > > WARNING: DANGER: WARNING: > > READ THE DATASHEET BEFORE TRYING #2. YOU COULD END UP KILLING THE PIC BY > RUNNING TOO MUCH POWER THRU IT. > > Good luck! Hope this helps. > > Michael Brown > Instant Net Solutions > www.KillerPCs.net > > "In the land of the blind, he who has one eye is king" > > ----- Original Message ----- > From: "Haris I. Volos" > To: > Sent: Sunday, March 10, 2002 8:59 AM > Subject: [PIC]: 16F877 PORTD Can't run 8 LEDs simultaneously > > > > Hi! Another strange behaviour.... > > > > I have connected 8 leds in series with 8 1K resistors respectively to > PORTD, > > the LEDs light at logic "1". > > > > RD0-------|>|---/\/\/\/\------GND > > .... LED 1K > > RD7-------|>|---/\/\/\/\------GND > > > > > > If you light each LED alone its OK but if you try to light more than 4 the > > LEDs, RD0 and RD4 do not light even though that 5V are applied to the > LEDs. > > The voltage between the particular LED leads is 0.8V > > . > > I reduced the resistor to half and tried other LEDs but nothing, also I > > reset all TRISE bits (for the Paraller Port mode). > > I have read the datasheet but doesn't state anything. > > > > What do you thing? > > > > Thanks in advance, > > > > Haris > > > > -- > > http://www.piclist.com hint: The PICList is archived three different > > ways. See http://www.piclist.com/#archives for details. > > > > > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.