Appendix C: Conversion Formatters
Conversion Formatters
This appendix lists the Conversion Formatters available for the commands
SERIN, I2CIN, LCDIN, and OWIN and demonstrates, though various
input/output data examples, exactly what will be received when using
these formatters.
Decimal
⊗ ⊗
Formatters
123
DEC
--
--
--
1
DEC1
--
12
DEC2
DEC3
--
123
--
--
DEC4
DEC5
--
--
SDEC
--
--
--
1
SDEC1
--
12
SDEC2
SDEC3
--
123
--
--
SDEC4
SDEC5
--
--
⊗ Means any non-decimal-numeric characters such as letters, spaces, minus signs, carriage
returns, control characters, etc. (Decimal numerics are: 0,1,2,3,4,5,6,7,8 and 9).
-- Means no valid data (or not enough valid data) was received so the SERIN command will
halt forever (unless the Timeout argument is used).
Hexadecimal
⊗ ⊗
Formatters
1F
--
--
HEX
--
1
HEX1
HEX2
--
1F
HEX3
--
--
--
--
HEX4
SHEX
--
--
--
1
SHEX1
--
1F
SHEX2
SHEX3
--
--
SHEX4
--
--
NOTE: The HEX formatters are not case sensitive. For example, 1F is the same as 1f.
⊗ Means any non-hexadecimal-numeric characters such as letters (greater than F), spaces,
minus signs, carriage returns, control characters, etc.
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).
-- Means no valid data (or not enough valid data) was received so the SERIN command will
halt forever (unless the Timeout argument is used).
BASIC Stamp Programming Manual 2.0c • www.parallaxinc.com • Page 341
Characters Received
123⊗ ⊗
-123⊗ ⊗
⊗ ⊗ 123⊗ ⊗
123
123
123
1
1
1
12
12
12
123
123
123
123
123
123
123
123
123
123
-123
123
1
-1
1
12
-12
12
123
-123
123
123
-123
123
123
-123
123
Characters Received
1F⊗ ⊗
-1F⊗ ⊗
⊗ ⊗ 1F⊗ ⊗
1F
1F
1F
1
1
1
1F
1F
1F
1F
1F
1F
1F
1F
1F
1F
-1F
1F
1
-1
1
1F
-1F
1F
1F
-1F
1F
1F
-1F
1F
12345⊗ ⊗
65536⊗ ⊗
255255⊗ ⊗
12345
0
58647
1
6
12
65
123
655
1234
6553
12345
0
25525
12345
0
-6889
1
6
12
65
123
655
1234
6553
12345
0
25525
15AF⊗ ⊗
10000⊗ ⊗
3E517⊗ ⊗
15AF
0
E517
1
1
15
10
15A
100
15AF
1000
3E51
15AF
0
-1AE9
1
1
15
10
15A
100
15AF
1000
3E51
(Hexadecimal numerics are:
2
25
255
2552
2
25
255
2552
3
3E
3E5
3
3E
3E5
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?