8 Leds


Closed Thread
Results 1 to 5 of 5

Thread: 8 Leds

  1. #1
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79

    Default 8 Leds

    Hello.
    I'm using PIC16F872 to turn on 8 led's at the same time. There are any problems in having the 8 ledīs on at the same time? I'll have the same brightness in all ledīs?
    What do you think using Shift and store bus registers?
    I'll have 10 outputīs (8 ledīs+1relay+1buzzer) and 4 inputīs (3sensors+1switch).
    Regards

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hello Leonel,

    The data cheet for the 16F872 says the max current sink OR source for BOTH ports A & B is 200ma. So depending on the current draw of your LEDs I think you are safe to put all of them on at the same time. I don't like stressing a circuit so I use transistors or driver packages like a ULN2003 or similar types to drive external devices. The boards I just made for a project have transistor drivers for the LEDs and I used ULN2003s to drive remote LED display boards just to keep my project compatable with the existing wiring and circuits.

    As for shift and store registers, I guess it depends on the overall project requirements. I'm working on some add-ons to my project and am looking at using the I2C PCF8574's for I/O ports. Nav Micro has posted some of his projects on this Forum in the past along with photos of his boards using 8574's for I/O.

    If you're working on an alarm project, that's my area of interest. I have been in the alarm business for over 30 years now and have made numerous devices that have kept my operation ahead of the other alarm companies in my area. My current project is a 160 zone annunciator system for 2 apartment buildings. I am replacing and old system that has no replacement parts available. It's nearing completion in the next few weeks.

    Have fun with your project. If I can help in the future let me know.

    BobK

  3. #3
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79


    Did you find this post helpful? Yes | No

    Default Pic16f57

    Today I decided to use PIC16F57 because itīs cheaper than PIC16F872. PIC16F57 has a max. output current sourced/sunk by a single I/O port (PORTA, B or C) of 50 mA. If i use a 270R resistance from 5V, iīll have 18mA thatīs quite enough for my led brightness.
    I wonder if ULN2003A or other component make my project "cleaner". If i only use the PIC16F57 i can trust in my project? In normal conditions Iīll not have problems?
    My project itīs making a cooling machine, that has ledīs to advise in what point of the machine goes.
    Regards

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    You'll have <18mA for each LED with a 270-ohm series limiting resistor at 5V.

    LED current = Vcc - Vled/R. Vled is the voltage drop of the LED. R is the series limiting resistor.

    With Vcc = 5V, Vled = 1.2V and R=270, then (5V-1.2V)/270 = ~14mA.

    8 x 14mA = ~112mA total for 8 LED's. Should be fine. Most LED's will glow pretty good with just 8-10mA.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    You know, there are LEDs burning with 3mA ?
    I think they will be better to connect directly to a PIC.

Similar Threads

  1. saving RCREG to word
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th September 2008, 13:51
  2. Replies: 9
    Last Post: - 31st July 2008, 08:56
  3. Replies: 1
    Last Post: - 29th September 2007, 18:05
  4. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  5. controlling leds with the switches
    By ilteris in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th October 2005, 21:02

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