fb:porticula NoPaste
LEDBlinker.bas
Uploader: | PMedia |
Datum/Zeit: | 22.09.2007 21:20:12 |
'Einfach an CS & DS 2 LED's anklemmen, und das ganze dann an COM2 anschließen - sie werden blinken!
#include "fbgfx.bi"
dim ct as single
dim waittime as single
dim owt as single
dim x as integer
ba = &h2F8
waittime = 64
ct = 0
OPEN COM "COM2:9600,N,8,1,CS,DS" AS #1
BLINK:
x += 1
if x > 640 then x = 0
locate 1,1
print waittime
OUT (BA+4), &b00
SLEEP abs(waittime)
OUT (BA+4), &b01
SLEEP abs(waittime)
OUT (BA+4), &b11
SLEEP abs(waittime)
OUT (BA+4), &b10
SLEEP abs(waittime)
if multikey(sc_escape) then goto ende
GOTO BLINK
ende:
CLOSE #1