Turning on an LED with the Parallax Propeller
The propeller supplies 3.3V on it's PIN when set as an output, an LED should always be protected with a resistor and a 100ohm resistor between the Propeller and LED is a safe choice (and probably something you have in stock)
Not all LEDs are the same and you may need a different value for the resistor depending on the LED, and some require more voltage and you might not even be able to drive them with a Propeller pin.
You could probably get by without a resistor, the LED *probably* won't burn out, but it'd be a bad habit to get into :)
PUB TURNLEDON
dira[3] := 1 ' Set to output
outa[3] := 1 ' Turn it on
repeat ' Need this otherwise the program will end and turn everything off...
PUB BLINKLED
dira[3] := 1 ' Set to output
repeat
outa[3] := 1 ' Turn it on
waitcnt(clkfreq /2 + cnt) ' pause for a second
outa[3] := 0 ' Turn it off