Connect with us

LED Help!!!!!!

Discussion in 'Microcontrollers, Programming and IoT' started by paddy, Nov 23, 2012.

Scroll to continue with content
  1. paddy

    paddy

    81
    0
    Sep 11, 2012
    Hello,

    I have to interface around 120 LED's to PIC18F4520.

    I am planning to do it with Latch IC 74HCT574. But it increases number of latch IC's.

    As per the datasheet the maximum current sourced and sunk by all ports of micro controller is 200mA. Is it enough to drive all the LED's?

    Please suggest.

    Thanks,
    paddy
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    I would recommend a string of 74HC595's (there are also dedicated LED drivers). This will remove problems with ghosting. 74HC594's can do a similar job.

    Each 74HC595 can control 8 independent LEDs (or strings of LEDs).

    3 outputs of your microcontroller can do the whole lot.

    120 LEDs (assuming 20mA each) will require just under 2.5A from your power supply.
     
  3. paddy

    paddy

    81
    0
    Sep 11, 2012
    Thanks for your suggestion.

    I am collecting the data from PLC over modbus.

    From modbus the data of coil for 120 addresses is collected and according to received data, the status of LED should change.

    So i am bit confused about how to use the latch 74HC595 to achieve this and how it would reduce the number of latches?

    Also can you please explain me what is the problem of ghosting? I am unaware of that.

    thanks
     
    Last edited: Nov 23, 2012
  4. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    IMO because of that huge current requirement you are much better using dedicated serial PWM LED driver chips... You can drop that down to give or take a few 100mA from 2.5A...
     
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    The chip you suggested is not a latch, it's a set of D flipflops. With this you can either create a latch, or a shift register. It's pretty common to use a shift register to load up a series of LEDs, and that's what I thought you were doing. Perhaps you're using these to latch a parallel signal, thus needing 8 parallel bits and n control signals. It's pretty wasteful unless you need really high speed.

    You either turn all the LEDs off (using the tristate output) while you load a new set (which may introduce flicker) or you keep them turned on and risk having some ghosting as the bits are shuffled along.

    The 595 has a latch so you can load all the bits then change them all in a single operation. You can do this at several MHz, so the entire load operation will take some small fraction of a millisecond.
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    Hmmm, can't see how this can reduce the current. Perhaps if you have a switchmode driver you can, but not with PWM. The same average current is the same average current.
     
  7. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    Most dedicated PWM LED driver chips don't light all the LEDs on at any given time, or at least the ones I use don't operate that way... Using PWM with a combined LED matrix like for example like the HT1632C driver chip, you can easily run over 100 or even 200+ LEDs with only a few 100mA @ 100% duty cycle...
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-