::  Home  

Dallas 1-Wire Master-Slave System

Posted in Device Interfacing
On Friday, August 18, 2006

1-Wire® from Dallas Semiconductor is a signaling protocol to enable bidirectional communication in single line/wire system (1 line for bidirectional data, 1 line for grounding ). 1-Wire® is a Master-Slave system, where one master communicate to one or more device(s) one device at a time. Microcontroller usually act as master. The slave can be I/O or memory devices, such as sensors, RTC, ADC, ROM, EEPROM, etc.

There are four basic operation of 1-Wire® master device:

  • Reset bus
  • Write logic ‘1′ bit to bus
  • Write logic ‘0′ bit  to bus
  • Read bus



Following table from Dallas describes those operations:

Operation Description Implementation
Write “1″ Send a ‘1′ bit to the 1-Wire slaves (Write 1 time slot) Drive bus low, delay A
Release bus, delay B
Write “0″ send a ‘0′ bit to the 1-Wire slaves (Write 0 time slot) Drive bus low, delay C
Release bus, delay D
Read bit Read a bit from the 1-Wire slaves (Read time slot) Drive bus low, delay A
Release bus, delay E
Sample bus to read bit from slave
Delay F
Reset Reset the 1-Wire bus slave devices and ready them for a command Delay G
Drive bus low, delay H
Release bus, delay I
Sample bus, 0 = device(s) present, 1 = no device present
Delay J

A common microprocessor can be program to be Master of 1-Wire® line, but these requirements should be satisfied:

  • The communication port must be bidirectional, its output is open-drain, and there is a weak pull-up on the line.
  • The system must be capable of generating an accurate and repeatable 1µs delay for standard speed and 0.25µs delay for overdrive speed.
  • The communication operations must not be interrupted while being generated.

Here are some Dallas devices which use 1-Wire® bus

  • DS18S20 Parasite-Power Digital Thermometer
  • DS1904 RTC iButton
  • DS2408 8-Channel Addressable Switch
  • DS2413 Dual Channel Addressable Switch
  • DS2417 Time Chip With Interrupt
  • DS2422 Temperature/Data Logger with 8kB Datalog Memory
  • DS2423 4 kbit RAM with Counter
  • DS2430A 256 bit EEPROM
  • DS2431 1024-Bit EEPROM
  • DS2432 1kb Protected EEPROM with SHA-1 Engine
  • DS2450 Quad A/D Converter
  • DS2480B Line Driver with Load Sensor
  • DS2890 Digital Potentiometer
  • etc..

For more information about 1-Wire®, see  Dallas application note, 1-Wire®  master communication routines in C language. See also how to implement 1-Wire®  in PIC Microcontroller.


Possible Related Entries:
[Embedded System roll-b]
Caution:
Non-English page is generated by an automatic translation software which can rise inaccurate translation.
Consider to view the original English version via link at the bottom of this page.