Forum Discussion

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

Is it safe to use I/O pins like an H-bridge?

I am working on a board with an EP3C16E144 that has a RJ-45 with integrated LED's. One of the LED's is bi-color, with the two diodes wired in opposite directions. If you forward bias the LED, it glows green. Reverse bias, it glows orange.

I had planned to simply wire both legs to different I/O pins, and switch colors by simply driving one pin high, and the other low. Essentially, "00" or "11" would turn the LED off, "10" would glow green, and "01" would glow orange.

The data sheet for the Cyclone III specifies a min/max iout of -25 to +40mA, and the LED's specify about 20mA max (in either direction) - though they will light with less current. I would think this would mean that this plan is safe, but before I spin a board with the two legs of the LED wired to the FPGA, I wanted to be sure. I did drop a 120 ohm resistor in the circuit. The min voltage drop is the orange - about 2.1V. The bank is set to 3.3V to support other functions.

1 Reply

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

    This is completely safe, as long as the maximum ratings for the individual pins and the pin group aren't exceeded.

    You should consider, that Quartus reduces the drive strength for EP3C to 2 mA with the CMOS3.3V I/O standard, so you should calculate an effective output resistance of 50 to 70 ohms for each pin. In other words, you achieve the intended LED current at best with a zero ohms external resistor.