-
Notifications
You must be signed in to change notification settings - Fork 2
Parasitic
1-Write microLAN allows two power modes, the standard method uses +, -, and a data line. If space or wiring is at a premium, the devices can be drive with just the - and the data line and this is called parasitic mode. Each DS-Family has an internal capacitor to keep the device going while the data line is used for data transmission, but the process of measuring the temperature, called "conversion", uses a lot more power and the data line needs to have a strong pullup while a conversion is taking place. The library sets the value of this public variable to "true" if one or more parasitically powered devices are detected, otherwise it is set to "false". The variable is set during ScanForDevices() and should not be modified. The library acts differently when parasitic devices are present, if a conversion is taking place on any device on the microLAN then any data transmissions are delayed until the conversion is assumed to have have finished.
const uint8_t ONE_WIRE_PIN = 8; // 1-Wire microLAN pin
DSFamily_Class ds(ONE_WIRE_PIN); // Instantiate
uint8_t thermometers = ds.ScanForDevices(); // find all devices
Serial.print("Found ");
Serial.println(thermometers);
if (ds.Parasitic) // If parasitic found
Serial.print("1 or more parasitic"); // display found
else // otherwise
Serial.print("No parasitic devices"); // display not found
Serial.println(" devices found.");
Overview
Installation
Class Instantiation
ScanForDevices()
ReadDeviceTemp()
DeviceStartConvert()
GetDeviceResolution()
SetDeviceResolution()
Calibrate()
GetDeviceCalibration()
SetDeviceCalibration()
GetDeviceROM()
crc8()
MinTemperature()
MaxTemperature()
AvgTemperature()
StdDevTemperature()