EasyManua.ls Logo

Parallax BASIC Stamp 2e - Page 175

Default Icon
353 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5: BASIC Stamp Command Reference LCDOUT
BASIC Stamp Programming Manual 2.0c www.parallaxinc.com Page 173
Conversion
Formatter
Type of Number Notes
DEC{1..5} Decimal, optionally fixed to 1 5 digits 1
SDEC{1..5} Signed decimal, optionally fixed to 1 5 digits 1,2
HEX{1..4} Hexadecimal, optionally fixed to 1 4 digits 1
SHEX{1..4} Signed hexadecimal, optionally fixed to 1 4 digits 1,2
IHEX{1..4} Indicated hexadecimal, optionally fixed to 1 4 digits ($ prefix) 1
ISHEX{1..4}
Signed, indicated hexadecimal, optionally fixed to 1 4 digits
($ prefix)
1,2
BIN{1..16} Binary, optionally fixed to 1 16 digits 1
SBIN{1..16} Signed binary, optionally fixed to 1 16 digits 1,2
IBIN{1..16} Indicated binary, optionally fixed to 1 16 digits (% prefix) 1
ISBIN{1..16} Signed, indicated binary, optionally fixed to 1 16 digits (% prefix) 1,2
1 Fixed-digit formatters like DEC4 will pad the number with leading 0s if necessary; ex:
DEC4 65 sends 0065. If a number is larger than the specified number of digits, the
leading digits will be dropped; ex: DEC4 56422 sends 6422.
2 Signed modifiers work under two's complement rules.
Special Formatter Action
?
Displays "symbol = x' + carriage return; where x is a number.
Default format is decimal, but may be combined with conversion
formatters
(ex: BIN ? x to display "x = binary_number").
ASC ?
Displays "symbol = 'x'" + carriage return; where x is an ASCII
character.
STR ByteArray {\L}
Send character string from an array. The optional
\L argument
can be used to limit the output to L char
acters, otherwise,
characters will be sent up to the first byte equal to 0 or the end of
RAM space is reached.
REP Byte \L
Send a string consisting of
Byte repeated L times
(ex: REP "X"
\10 sends "XXXXXXXXXX").
The Command argument is useful for proceeding a set of data with a
special LCD instruction. For example, the code below will move the
cursor to location 64 (the first character on the second line) and print "Hi":
LCDOUT 1, 128 + 64, ["Hi"]
The next example, below, will turn on the blinking block cursor and print
"Yo!":
LCDOUT 1, 13, ["Yo!"]
Occasionally, you will want to send data without preceding it with a
command. To do this, simply use 0 for the Command argument, as in:
LCDOUT 1, 0, ["Hello there!"]
Table 5.34: LCDOUT Special
Formatters.
Table 5.33: LCDOUT Conversion
Formatters.
U
SING THE COMMAND ARGUMENT.

Table of Contents

Related product manuals