Parallax BASIC Stamp 2e Programming Manual page 208

Table of Contents

Advertisement

OWOUT - 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.21 shows the meaning of each of the 4
bits of Mode. Table 5.49 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 OWOUT command, Mode should be set
for a Front-End Reset (to initialize the transaction). This may vary due to
device and application requirements, however.
When using the Bit (rather than Byte) mode of data transfer, all variables
in the OutputData argument will only transmit one bit. For example, the
following code could be used to send two bits using this mode:
Page 206 • BASIC Stamp Programming Manual 2.0b • www.parallaxinc.com
Back-End Reset
0=no reset
1=generate reset after data
2
1
0
FERes
Effect
Front-End Reset
0=no reset
1=generate reset before data
Figure 5.21: Mode Format.
Table 5.49: OWOUT Common
Mode Values.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?

Table of Contents