Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Electronics Newbie question concerning LEDs

Hi all,

I am an electronics newbie, and I am trying to design an guitar that has a light up fretboard. To do this I need to control about 120 individual, single color LEDs, and I am having trouble finding a good method. I've been researching for a few days now, and can't find a board with that many I/O pins to control. I was wondering if the Cyclone II would be able to control the LEDs? and if so would I need any other equipment?

Thanks so much in advance!!!!

-Steve

15 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Since this is not really on the FPGA topic anymore, I suggest we discuss this off-line. I will send you a private message and we can continue from there.

    Regards,

    Niki
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have a question:

    usually, when ever I sow LEDs driven by FPGA, the IO pin was connected to catoda side (sinking the current) and the current strength was determined by a series resistor, so '0' closed the circuit and '1' opened it.

    wouldn't this scheme enable him to drive all 160 LEDs at once?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yes, you can, but it is a fairly expensive way to drive 160LEDs - you would need an FPGA with at least 160 user I/Os. You would have to go 240pin PQFP (if it has 160 I/Os) or BGA. Multiplexing LEDs in a matrix is much more economic in terms of resources and cost. In the extreme you could do it with 4 + 2 = 6 I/Os! 4 I/Os indicate the column, and is decoded with a 4-16 binary decoder chip. Two I/Os shift the 16 bits for each row into a 16 bit shift register (clock and data). I have done this a long time ago to create a 160 LED matrix and drive it from my PC's parallel port and it worked well.

    Regards,

    Niki
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    of course you can connect a line of LEDs (10 in each line) and use only 16 I\Os, but I meant it will solve the current consumption problem, also he will need only resistors on the board, with no active (complicated) components.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    When using many outputs with higher current, also the maximum ratings for output groups should be considered. For Cyclone II and III, 20 mA per pin is generally possible. You should avoid however to switch all pins simultaneously.

    I generally agree with the opinion, that there are more economic options to drive a large number of LEDs than using a FPGA. If you want to add a few ten outputs to an existing system, it can be meaningful of course.

    External, serial interfaced drivers for slow and medium speed signals, e.g. a LED matrix, have the basic advantage of simplifying signal routing. This can be a sufficient reason to use them, I think.