AN3684| Application Note

AN3684 PDF

AN3684| Application Note


Maxim > App Notes > 1-WIRE DEVICES Keywords: i2c, 1-wire, bridge, ds2482, line driver, guide, slew, waveforms, master

Nov 07, 2005

APPLICATION NOTE 3684

How to Use the DS2482 I C 1-Wire Master
Abstract: The DS2482 is an I2C bridge to the 1-Wire network protocol. As a bridge, the DS2482 allows any host with I2C communication to generate properly timed and slew-controlled 1-Wire waveforms. This Application Note is a user's guide for the DS2482 I2C 1-Wire Line Driver, and provides detailed communication sessions for common 1-Wire master operations.

1. Introduction
The 1-Wire communication protocol can be generated using the DS2482, which is a bridge for I2C communication to a 1-Wire network. This bridge allows any host with I2C to generate properly timed 1-Wire waveforms. See Figure 1 for a simplified diagram of the DS2482 configuration. Implementing this protocol and navigating the available DS2482 commands can be time-consuming and confusing. This document presents an efficient implementation of the basic and extended 1-Wire operations using the DS2482. The construction of I2C input packets to handle 1-Wire communication is explained. These operations provide a complete foundation to perform all the functions for current and future 1-Wire devices. Abstracting the 1-Wire operations in this fashion leads to 1-Wire applications that are independent of the 1-Wire master type. This document complements the DS2482 data sheet, but does not replace it. The DS2482 is available in two configurations, a singlechannel 1-Wire master (DS2482-100) and an eight-channel 1-Wire mast
er (DS2482-800).

Figure 1. Simplified illustration of DS2482 function as a bridge for I2C communication and a 1-Wire network.

2. The 1-Wire Interface
There are a few basic 1-Wire functions, called primitives, which an application must have in order to perform any 1-Wire operation. This first function resets all the 1-Wire slaves on the bus, readying them for a command from the 1-Wire master. The second function writes a bit from the 1-Wire master to the slaves, and the third reads a bit from the 1-Wire slaves. Since the 1-Wire master must start all 1-Wire bit communication, a 'read' is technically a 'write' of a single bit with the result sampled. Almost all other 1-Wire operations can be constructed from these three operations. For example, a byte written to the 1-Wire bus is just eight single bit writes. The 1-Wire Search Algorithm can also be constructed using these same three primitives. The DS2482 incorporates a search using the 1-Wire triplet command, which greatly reduces the communication required to do a search. Table 1 shows the three basic primitives (OWReset, OWWriteBit/OWReadBit, and OWWriteByte/OWReadByte), along with three other useful func
tions (OWBlock, OWSearch, msDelay) that together make up a core set of basic 1-Wire operations. These operation names will be used throughout the remainder of this document. Table 1. Basic 1-Wire Operations Operation Description OWReset OWWriteBit/OWReadBit OWBlock OWSearch msDelay Sends the 1-Wire reset stimulus and check for pulses of 1-Wire slave devices. Sends or receives a single bit of data to the 1-Wire bus. Sends and receives multiple bytes of data to and from the 1-Wire bus. Performs the 1-Wire Search Algorithm (see Application Note 187 mentioned above). Delays at least the specified number of milliseconds.

OWWriteByte/OWReadByte Sends or receives a single byte of data to the 1-Wire bus.

Extended 1-Wire functions (such as overdrive communication functions) are not covered in the basic operations in the table above.


AN3684 Application Note maxim Download PDF

Add this permalink to your bookmarks for future download of AN3684 ApplicationNote

Permalink: http://application.emcelettronica.com/maxim/AN3684

PDF AN3684 APPLICATION NOTE