owSearchX (Function) |
Top Previous Next |
An advanced version of the owSearch function that allows detection of all 1-Wire devices on the bus which belong to the specified families.
Each 1-Wire device has a unique ROM-number like the iButton. This number is used to point out one specific device of many devices on the bus. Before any devices can be accessed, the ROM-number has to be discovered. By using the 1-Wire search function, all devices on the 1-Wire bus are discovered and the ROM-numbers are stored in a temporary list placed inside the RTCU device.
The list of known devices will be update when the following functions are called: owSearchX
The devices are sorted in the order they are discovered on the 1-Wire net. If a device is removed from the bus, all devices after this will move one position down the list when a new search is carried out As the search function is intended for general 1-Wire use, a family number can be supplied when making the function call to optimize the search.
Current official list of Maxim 1-Wire family codes:
To optimize the search time, only conduct a single search for all devices.
Input: first : INT [0..255] (default 0) Skips devices with lower family codes.
last : INT [0..255] (default 255) Does not search for devices with higher family codes than this.
reset : BOOL [TRUE, FALSE] (default TRUE) Deletes all known devices before search.
Returns: INT
Declaration: FUNCTION owSearchX : INT;
Example:
Please see the "Examples - Generic OneWire Example" |