T
1-
HE
WIRE PROTOCOL FORMAT
Figure 5.18: OWIN Reset and
Presence Pulse.
5: BASIC Stamp Command Reference – OWIN
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.18 details the reset pulse generated by the BASIC Stamp and a
typical presence pulse generated by a 1-wire slave, in response.
+5 (vdd)
This reset pulse is controlled by the lowest two bits of the Mode argument
in the OWIN command.
Function Command (ex: Mode = 1), after the Transaction/Data portion (ex:
Mode = 2), before and after the entire transaction (ex: Mode = 3) or not at all
(ex: Mode = 0). See the section on Mode, above, for more information.
Following the Initialization part is the ROM Function Command. The
ROM Function Command is used to address the desired 1-wire device.
Table 5.47 shows common ROM Function Commands. If only a single
1-wire device is connected, the Match ROM command can be used to
address it. If more than one 1-wire device is attached, the BASIC Stamp
will ultimately have to address them individually using the Match ROM
command.
3)
Memory
Additionally, the ROM Function Command and
Resting State
15 - 60 s
0 (vss)
BASIC Stamp's
Reset Pulse
µ
Apx. 564 s
driven by BASIC Stamp
driven by 1-wire device
It can be made to appear before the ROM
BASIC Stamp Programming Manual 2.0c • www.parallaxinc.com • Page 201
Function
Command,
µ
Device's
Presence
Pulse
µ
60 - 240 s
and
4)
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?