Introduction
SkipRomTemps.exe is an example program that reads temperatures from DS1920
iButtons. It does so by first issuing a skip rom and broadcasting to all
DS1920 thermometers to perform a temperature conversion simultaneously.
This can reduce the time necessary to retrieve temperature readings from
multiple devices.
This particular example was written in Microsoft VB.NET (Visual Studio 2005).
Requirements
1-Wire
Drivers version 4.00 or higher, with the OneWireAPI.NET.dll in the
same directory as the executable.
.NET Framework 2.0 Redistributable:
Visual J# .NET 2.0 Second Edition Redistributable:
When compiling this program, make sure that the program references
“vjslib”, and the OneWireAPI.NET.dll.
Before running this program, make sure to set the default 1-Wire adapter settings to the preferred type (usually "{DS9490}") and number (usually "USB1"). This can be done by running the "Default 1-Wire NET.exe" program found in the 1-Wire Drivers application directory.
Operation
To run the SkipRomTemps.exe
program, double-click the pre-compiled executable in the ..\bin
directory. A window with a text box and button will appear.
Clicking the button will start a search for DS1920s.
The results of the search and the appropriate temperature will appear in the
text box.
This program only works with the DS1920 (DS18S20) temperature sensors. To shorten the time to retrieve temps, it issues a "SkipRom" command followed by a "TempConversion" command. It broadcasts to all DS1920s to perform a temperature conversion at the same time, thus avoiding several 1-second delays.
Lines of code can be uncommented if the programmer wishes to provide external power to multiple DS18S20s.
WARNING: Keep in mind that having many DS1920s on the same line performing temperature conversions at the same time consumes more power than performing temperature conversions one at a time. If too many are on the 1-Wire network at the same time, erroneous results or exceptions might occur.
Files
AssemblyInfo.vb - VB.NET assembly file.
GetSkipRomTempsMainForm.resx - VB.NET resource file.
GetSkipRomTempsMainForm.vb - The program’s main form.
Readme.html - This file.
SkipRomTemps.sln - VB.NET SkipRomTemps solution file
SkipRomTemps.vbproj - VB.NET project file.
SkipRomTemps.vbproj.user - VB.NET project user file.
..\..\..\..\Lib\OneWireAPI.NET.dll - 1-Wire API
..\bin\SkipRomTemps.exe - Program executable.