fpga4fun.comwhere FPGAs are fun

Opto 1 - How LEDs work

Controlling an LED with an FPGA

The ideal LED control is a current source.
FPGA pins are voltage controlled, so a simple solution is to add a resistor in series with the LED. Values from 100Ω to 1KΩ are common.

LED electronic basics
An LED (Light Emitting Diode) is a semiconductor device that produces light when current is going through it.
The LED symbol looks like a diode, with an anode (+) and cathode (-).