OWOUT - BASIC Stamp Command Reference
Conversion
Formatter
DEC{1..5}
Decimal, optionally fixed to 1 – 5 digits
SDEC{1..5} Signed decimal, optionally fixed to 1 – 5 digits
HEX{1..4}
Hexadecimal, optionally fixed to 1 – 4 digits
SHEX{1..4} Signed hexadecimal, optionally fixed to 1 – 4 digits
IHEX{1..4} Indicated hexadecimal, optionally fixed to 1 – 4 digits ($ prefix)
Signed, indicated hexadecimal, optionally fixed to 1 – 4 digits
ISHEX{1..4}
($ prefix)
BIN{1..16}
Binary, optionally fixed to 1 – 16 digits
SBIN{1..16} Signed binary, optionally fixed to 1 – 16 digits
IBIN{1..16} Indicated binary, optionally fixed to 1 – 16 digits (% prefix)
ISBIN{1..16} Signed, indicated binary, optionally fixed to 1 – 16 digits (% prefix)
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.
The 1-wire protocol has a well-defined standard for transaction sequences.
Every transaction sequence consists of four parts: 1) Initialization, 2) ROM
Function
Command,
Transaction/Data.
Memory Function Command are always 8 bits wide (1 byte in size) and is
sent least-significant-bit (LSB) first.
The Initialization part consists of a reset pulse (generated by the master)
and will be followed by a presence pulse (generated by all slave devices).
Figure 5.22 details the reset pulse generated by the BASIC Stamp and a
typical presence pulse generated by a 1-wire slave, in response.
Page 208 • BASIC Stamp Programming Manual 2.0b • www.parallaxinc.com
Type of Number
3)
Memory
Function
Additionally, the ROM Function Command and
Notes
1
1,2
1
1,2
1
1,2
1
1,2
1
1,2
Command,
and
4)
Table 5.51: OWOUT Conversion
Formatters.
T
1-
HE
WIRE PROTOCOL FORMAT
.
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?