OWIN - BASIC Stamp Command Reference
The Mode argument is used to control placement of reset pulses (and
detection of presence pulses) and to designate byte vs. bit input and
normal vs. high speed. Figure 5.17 shows the meaning of each of the 4
bits of Mode. Table 5.44 shows just some of the 16 possible values and
their effect.
Byte/Bit Transfer
0=byte
1=bit
Low/High Speed
0=low
1=high
3
Low/Hi Byte/Bit BERes
Mode
0
No Reset, Byte mode, Low speed
1
Reset before data, Byte mode, Low speed
2
Reset after data, Byte mode, Low speed
3
Reset before and after data, Byte mode, Low speed
4
No Reset, Bit mode, Low speed
5
Reset before data, Bit mode, Low speed
8
No Reset, Byte mode, High speed
9
Reset before data, Byte mode, High speed
The proper value for Mode depends on the 1-wire device and the portion
of the communication you're working on. Please consult the data sheet for
the device in question to determine the correct value for Mode. In many
cases, however, when using the OWIN command, Mode should be set for
either No Reset (to receive data from a transaction already started by a
OWOUT command) or a Back-End Reset (to terminate the session after
data is received).
requirements, however.
When using the Bit (rather than Byte) mode of data transfer, all variables
in the InputData argument will only receive one bit. For example, the
following code could be used to receive two bits using this mode:
Page 198 • BASIC Stamp Programming Manual 2.0b • www.parallaxinc.com
2
1
0
FERes
Effect
This may vary due to device and application
Back-End Reset
0=no reset
1=generate reset after data
Front-End Reset
0=no reset
1=generate reset before data
Figure 5.17: Mode Format.
Table 5.44: OWIN Mode Values.
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?