Drive an LED direct from a PIC IO pin (ie no current limiting resistor)


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Drive an LED direct from a PIC IO pin (ie no current limiting resistor)

    it has to... It's a case by case thing, monitor your HPWM output with a scope. But usually you want to manually turn the PIN HIGH /LOW. Just disable the PWM mode and use HIGH/LOW.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Drive an LED direct from a PIC IO pin (ie no current limiting resistor)

    Well I can tell you what's happening in practise (with that very circuit) ....a PWM duty value of 255 turn the leds on bright, a duty value of 0 turns them completely off. But my brain is now frazzled, because I always thought that with 'n' channel fet, with no source/ gate voltage differential (therefore a duty value of 0) a fet will conduct at its lowest RDS resistance .....& to 'cut it off', you need to make the gate more negative.

    But obviously with the above config the the source is at ground, the only way is up so to speak (on the gate...ie if driven by a PIC) ..therefore no possiblity of turning the n fet off.....which bit am I not grasping?!

    I removed the PIC (so the gate was floating) & the leds remained on (which is kind of what I expect)

    Brainache.

  3. #3
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Drive an LED direct from a PIC IO pin (ie no current limiting resistor)

    Well this clarifies how an n-channel mosfet will work



    but it doesn't go into detail.

    I'm making a (bad) assumption) that an n channel mosfet, will work in a similar fashion to a jfet (which I've used prior...mosfets never)...with jfets, you have to make the gate negative wrt to the source to cut them off....hey ho, I guess that why a jfet is called a jfet & a mosfet is called a mosfet....different devices...no workee the same.

  4. #4
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default Re: Drive an LED direct from a PIC IO pin (ie no current limiting resistor)

    Quote Originally Posted by HankMcSpank View Post
    ....to 'cut it off', you need to make the gate more negative.

    But obviously with the above config the the source is at ground, the only way is up so to speak (on the gate...ie if driven by a PIC) ..therefore no possiblity of turning the n fet off.....which bit am I not grasping?!
    Look up the Vgs parameter (and the typical transfer characteristics graph - IRF8714 in the example below) in the datasheet of a MOSFET for the answer.
    Attached Images Attached Images  
    Why pay for overpriced toys when you can have
    professional grade tools for FREE!!!

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts