Connect LED to I/O port with 220k resistor and 5V power supply. Connect cathode of LED to pin port and anode with resistor. You can still connect LED without resistor also but performance will not be good on those case becasue we are not limiting current to diode(LED). Below picture shows you clear observation of connection
fdzwgdnytkfujmdobrqv