On Sun, Jun 29, 2008 at 9:47 AM, Tom=E1s =D3 h=C9ilidhe w= rote: > > Let's say I have an LED with a Vf of 1.8 V and I want to put about 40 mA > through it. The cathode goes straight to ground and the anode goes to a > PIC pin. > > I can go from 5 V on the PIC pin, through a 80 ohm resistor into the > LED, but of course the problem is that I'll be drawing more than the > maximum current for a PIC pin. > > But I'm wondering if I could use two PIC pins together. Let's say I > connect RD0 and RD1 together and then do the following in C code: > > PORTD |=3D 3u; > TRISD &=3D ~3u; > > The idea would be that 20 mA would come from each pin. > > This a go-er? > I suppose, if you have extra pins. You should use a separate resistor from each pin, to help the current sharing. PIC outputs don't behave like ideal switches when you're drawing significant current from them. I was schooled by a Microchip engineer in this thread: http://groups.google.com/group/pickit-devel/browse_thread/thread/2dd07bed31= 64d97c/7c076ab1e6e79583 Regards, Mark markrages@gmail -- = Mark Rages, Engineer Midwest Telecine LLC markrages@midwesttelecine.com -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist