Altera_Forum
Honored Contributor
16 years agoIs 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.