- Name:
-
owin
- Syntax:
-
OWIN pin,mode,(variable, variable...)
Pin - is a variable/constant which specifies input pin to use.
Mode is a variable/ constant which selects the mode.
Each bit of 'mode' has a separate function:
| Bit 0 |
reset pulse sent before data |
| Bit 1 |
reset pulse sent after data |
| Bit 2 |
bit mode (receive 1 bit rather than 8 bits (1 byte)) |
| Bit 3 |
apply strong pullup after data |
For convenience these predefined constants may be used:
| 0 |
ownoreset |
4 |
ownoreset_bit |
| 1 |
owresetbefore |
5 |
owresetbefore_bit |
| 2 |
owresetafter |
6 |
owresetafter_bit |
| 3 |
owresetboth |
7 |
owresetboth_bit |
Variables(s) - receives the data.
- Description:
-
This command is used to read data from a one-wire device.
Read data (either full byte or single bit) from one-wire device connected to an input pin, with optional reset pulses before and after the read. This command cannot be used on the following pins due to silicon restrictions:
Use of one-wire parts is covered in more detail in the separate 'One-Wire Tutorial' datasheet.