The TMEX API is divided into five layers.
Session
File Operations
Transport
Network
Hardware Specific
The Hardware_Specific layer contains the only API calls that are hardware specific. The Session layer allows 1-Wire Network arbitration in a multi-tasking environment. The Network layer refers to API functions that read and verify the unique serial registration numbers of the iButtons and other 1-Wire devices. The Transport layer has data functions such as reading and writing Universal Data Packets. The File_Operations layer contains API calls to read and write files and do directory operations.
The TMEX API provides the function calls to communicate to iButtons
and
other 1-Wire devices over a 1-Wire Network. The 1-Wire network must be
connected
to a PC through a supported adapter. For a list of adapters available,
please
see the table below. Currently, adapters are available for USB,
parallel,
and serial ports. One end of the adapter connects to the PC, while the
other
end connects to the 1-Wire network.
Adapter |
Port |
Port Type |
Features |
DS9490B (iButton holder) |
USB |
6 |
power delivery, overdrive, single iButton
holder |
DS9490R (RJ11-Out) |
USB |
6 |
power delivery, overdrive, RJ–11 |
DS1410E (legacy) |
Parallel |
2 |
power delivery, overdrive, dual iButton holder, DS2401 ID |
DS9480 (future product) |
Serial (via USB) |
5 | USB-to-Serial-Port adapter, power delivery, overdrive, EPROM write, led indicators |
DS9097U-009 |
Serial |
5 |
power delivery, overdrive, RJ–11 connector, DS2502 ID |
DS9097U-S09 |
Serial |
5 |
power delivery, overdrive, RJ–11 connector, no ID |
DS9097U-E25 |
Serial |
5 |
power delivery, overdrive, RJ–11 connector, EPROM write |
DS1411 |
Serial |
5 |
power delivery, overdrive, single iButton
holder |
DS9097, DS9097E, DS1413 (legacy adapters) |
Serial |
1 |
legacy passive serial port adapters. DS9097E has EPROM write capabilities. DS1413 is iButton holder |
The above adapters are supported by the 1-Wire Drivers on the following
Microsoft operating systems: Windows
XP (service pack 2 and above), Windows
Vista, and Windows 2008
(Server).
They are supported on both 32-bit and 64-bit operating system versions
of these OSes.
The DS9490R, DS9490B, and DS9480 (future product) are USB Port
adapters for the 1-Wire protocol. They can be plugged into a USB port
and
provide the connection between a 1-Wire network and a computer. To
access
a 1-Wire network through the USB Port, the TMEX API programmer provides
the
appropriate number representing the respective TMEX port type to the
TMExtendedStartSession
function call. In this case, since the DS9490X USB port adapters are
Type
6, the number provided would be 6. The DS9480 is a USB-TO-SERIAL
adapter which looks like a serial port adapter. So, in this case,
the programmer would provide Type 5 as the number provided.
The USB 1-Wire adapters have several features. They support “power delivery” (strong pull-up), which provides power to special purpose 1-Wire devices such as the temperature iButton. They are also capable of communicating at “overdrive” speeds, which is a faster communication rate supported by some 1-Wire devices. The DS9480 (a future product) may incorporate the ability to write to 1-Wire devices containing EPROM memory, such as the DS1982 iButton. Writing to EPROM means that the adapter in question is capable of producing a 480-microsecond, 12 volt pulse on the 1-Wire Net.WARNING!! Caution must be maintained when using the EPROM write ability, since any non-EPROM 1-Wire devices on the 1-Wire Network during a 12-volt program pulse may be damaged. Finally, the DS9480 (a future product) contains an LED indicator that can be used to indicate that communication to the 1-Wire device is in progress.
The DS1410E is a Parallel Port adapter that functions on the LPT port (Type 2) and do not support programming the EPROM-based 1-Wire products. The DS1410E adapter supports overdrive communication and also supports power delivery.
The DS9097U-009, DS9097U-S09, and DS1413 are Serial Port adapters.
They work on the COM port (Type 5) and support overdrive and power
delivery. The DS9097,
DS1413 and DS9097E are legacy adapters and work on the COM port (Type
1) and do not support
overdrive communication or power delivery.
The basic design of the TMEX API is patterned after the International Standards Organization (ISO) reference model of Open System Interconnection (OSI), which specifies a layered protocol having up to seven layers, denoted as Physical, Link, Network, Transport, Session, Presentation, and Application. According to this model, the electrical and timing requirements of 1-Wire devices and the characteristics of the 1-Wire Network comprise the Physical layer. The software API calls TMTouchReset, TMTouchByte, and TMTouchBit correspond in this model with the Link layer, which also includes hardware initialization and fault detection facilities. The parameters of these API calls vary on different operations and on different devices. The Link layer is referred to as the Hardware_Specific layer above. The multi-drop functions TMFirst, TMNext, TMAccess, etc., that support selection of individual network nodes correspond to the Network layer. The software that transfers NV RAM data to and from individual network nodes corresponds to the Transport layer. In multi-user or multi-tasking environments such as Microsoft Windows, a Session layer effectively manages sharing of the 1-Wire Network among multiple instances (simultaneous invocations) of 1-Wire application programs. The Presentation layer provides a file structure that allows data on 1-Wire devices to be organized into independent files and randomly accessed. The Application layer represents the final application program designed by the software developer.
See Also