How to stipulate the execute time of the propeller controller ?
kevinspace
Posts: 56
Hello everyone~
How to stipulate the execution time of my propeller controller ?
For example :
Thanks a lot ~
How to stipulate the execution time of my propeller controller ?
For example :
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 PUB Main dira[16] := 1 repeat outa[16] := 1Above the code, how to stipulate the bright time of LED?
Thanks a lot ~
Comments
To toggle the output pin see the "~" command.
To delay see the "waitcnt" command
both are in the prop manual pdf that came with the PropTool so access it from the help menu of PropTool.
This should get you started. There is a prop tutorial (is it in the manual?) that shows how to flash a LED and then goes on to show how to get multiple cogs flashing leds.
If you still have problems, please ask.
I think you mean !.
@Kevin: Here's a simple blinker loop:
This will blink the LED as fast as spin can, probably too fast to see. Slow it down with a delay:
But I hope that I can designate the working time of the repeat loop.
In your way, the result will blink the LED always.
I hope the result that will launch the LED with my designate time, in the other hand,
I hope that I can set a counter, however, if I set the counter as 10 seconds, the LED will
launch 10 seconds, and then which will break the infinite loop, and if I set the counter as 20 seconds, the LED will launch 20 seconds and then which will break the infinite loop.
Therefore, how to edit the code of counter?
Thanks a lot~
It sounds like you need to learn how to program the Propeller and I suggest going through the Propeller Education Kit (PEK) tutorials. These are available from the downloads section of Parallax's website or via a "sticky" thread at the top of the thread list of this forum. There are examples in the tutorials for using multiple cogs for this sort of thing.
[Edit] Do follow Mike's advice and download the PEK documentation. It's a good place to start.