PORTWRITECHAR

Synopsis
PORTWRITECHAR data
Description

Writes one byte to the currently open port. PORTWRITECHAR outputs 1 if the byte was written succesfully and outputs -1 otherwise. The data input must be an integer from 0 to 255.

Example
PORTOPEN "com1
SHOW PORTWRITECHAR ASCII "a
1
SHOW PORTWRITECHAR ASCII "t
1
SHOW PORTWRITECHAR 13
1
WAIT 60
PRINT "Reading...
Reading...
REPEAT 10 [MAKE "x PORTREADCHAR IF NOT :x = -1 [TYPE CHAR :x]]
PRINT ".
at||
OK|
.
PORTCLOSE

SourceForge.net Logo