Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Driving LEDs

Status
Not open for further replies.

bsodmike

New Member
Hello :)

Normally I tend to have a resistor inline when testing with a PIC but when I get lazy I just shove in any ol' LED without the resistor. I believe that most of the pics can source 20 - 25mA but do the i/o lines have a current limiting resistor?

Cheers, Mike
 
bsodmike said:
Hello :)

Normally I tend to have a resistor inline when testing with a PIC but when I get lazy I just shove in any ol' LED without the resistor. I believe that most of the pics can source 20 - 25mA but do the i/o lines have a current limiting resistor?

As I understand it the specs don't really say?, but they give the impression it's NOT a good idea to abuse a PIC pin in this way.
 
bsodmike said:
Hello :)

Normally I tend to have a resistor inline when testing with a PIC but when I get lazy I just shove in any ol' LED without the resistor. I believe that most of the pics can source 20 - 25mA but do the i/o lines have a current limiting resistor?

Cheers, Mike

from how I understand it, there is no current limiting resistor, but the current limitation comes from the Rds(on) of the PIC's internal transistors

if you look at the block diagram for an IO port, you can see there is a P channel fet on the high side and an N channel fet on the low side of the output.

so at a given voltage, this internal resistance limits current to the range specified on the datasheet ... also note in the datasheet, their ratings on power dissipation and total sink/source current.

I agree with Nigel, it is probably not a good idea - but then again, if you stay inside the parameters set by the datasheet, perhaps it is allowable?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top