![]() | ||
| Home | SwiftX Archive | SwiftForth Archive | |

Hi,
I wrote a little program that lets the leds
sequentially flash (see code below).
I'd like now to stop, to start and to reset the
flashing leds after pushing several switches.
Normally I would create a table and store execution tokens
in it. The usually way to do it is with the ' (tick),
for instance:
' stop buttonstable !
But tick seems not to work. Does anyone know how it can be done?
Thanks in advance,
Viviane Beullens
|U| |S| |R| BACKGROUND TESTER
\ ACTION
: SEQBITFLASH ( -- )
1
BEGIN
PORTB C@ 2DUP SWAP - AND
PORTB C! 100 MS 2*
PORTB C@ 127 = IF DROP 1 CR
THEN
255 PORTB C! 100 MS
AGAIN ; \ For in task
: /TESTER ( -- )
$FF DDRB C! \ Set PORTB as OUTPUT
$FF PORTB C! \ set leds off at start up
TESTER BUILD TESTER ACTIVATE
BEGIN PAUSE SEQBITFLASH
AGAIN ;
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sat Aug 09 2003 - 12:01:15 PDT
This archive was generated by hypermail 2.2.0 : Fri Dec 05 2008 - 03:04:21 PST