Propeller Output Port States
tj_saggu
Posts: 3
Hi I am trying to turn an LED on, on one of the I/O ports.
I don't want it to toggle or anything.
Just want to set OUTA :=1 and activate the LED on power-up.
How does one go about to do that ?
????????????????
MainThread
DIRA := 1
OUTA := 1 ' LED turns on ?
????????????????
thanks,
I don't want it to toggle or anything.
Just want to set OUTA :=1 and activate the LED on power-up.
How does one go about to do that ?
????????????????
MainThread
DIRA := 1
OUTA := 1 ' LED turns on ?
????????????????
thanks,
Comments
Learn more at this link. Download the free tutorials to really learn more.
http://forums.parallax.com/showthread.php?89958-Propeller-Education-Kit-Labs-Tools-and-Applications
I tried that, every time I set the port to high... it glitches and sets the port back to low.
Do I need to put it in a (while loop) repeat loop ?
thanks
When your program gets to its end, if there isn't some code to keep the Propeller "awake" it will basically shut itself down and go to sleep, so to speak.
If you put a do-nothing repeat loop at the end of the program, then the Propeller will remain "on-line" and keep the pins in the states at which you instructed them to be.
Like this:
If you want to interact with the Propeller chip and the board you could load my Tachyon Forth onto it and then you could test these kind of things out in a heartbeat via a serial terminal connection (same as the programming port) in plain text.
If you type --> 0 PINSET <-- it will make P0 an output and high instantly.
If you type --> BEGIN 0 PINSET 100d ms 0 PINCLR 100d ms AGAIN <-- then it will flash on and off forever etc as soon as you hit the enter key. Look at the links in my sig.