1DS2404(3)                    One-Wire File System                    DS2404(3)
2
3
4

NAME

6       DS2404 - EconoRAM time chip
7
8       DS2404S
9              - Dual port memory plus time
10
11       DS1994 - 4k plus time iButton
12
13       DS1427 - Time iButton
14

SYNOPSIS

16       Real time clock, 4kbit memory. 3-wire interface, too.
17
18       04.XXXXXXXXXXXX / alarm | auto | cycle | date | delay | interval | mem‐
19       ory | pages/page.[0-15|ALL] | readonly/[memory|clock|cycle|interval]  |
20       memory | pages/page.[0-15|ALL] | readonly/[memory|clock|cycle|interval]
21       | running | set_alarm | start | trigger/[cycle,date,interval,udate,uin‐
22       terval] | udate | uinterval | address | crc8 | id | locator | r_address
23       | r_id | r_locator | type
24
25       84.XXXXXXXXXXXX / alarm | auto | cycle | date | delay | interval | mem‐
26       ory  | pages/page.[0-15|ALL] | readonly/[memory|clock|cycle|interval] |
27       running | set_alarm | start  |  trigger/[cycle,date,interval,udate,uin‐
28       terval] | udate | uinterval | address | crc8 | id | present | type
29

FAMILY CODE

31       04     DS2404 DS1994
32
33       84     DS1427 DS2404S
34

SPECIAL PROPERTIES

36   alarm
37       read-write, unsigned integer (0-111)
38       Alarm  state  of  the  DS2404  (3) triggered by time or counter events.
39       Reading the alarm state clears the alarm.
40       The alarm value is of the form CIR, where:
41
42       C      cycle counter alarm
43              0 no
44              1 yes
45
46       I      interval timer alarm
47              0 no
48              1 yes
49
50       R      real-time clock alarm
51              0 no
52              1 yes
53
54   auto
55       read-write, yes-no
56       Flag for mode of interval counter operation. 0=manual 1=auto
57       See the datasheet for details.
58
59   date
60       read-write, ascii
61       26 character date representation of the udate  value.  Increments  once
62       per second while running
63       Actual internal representation has higher precision.
64       Cannot be altered if readonly/clock is set.
65       Setting date to a null string will put the current system time.
66       Accepted date formats are:
67         Sat[urday] March 12 12:23:59 2001
68         Apr[il] 4 9:34:56 2002
69         3/23/04 23:34:57
70         current locale setting (your system's format)
71
72   delay
73       read-write, yes-no
74       Flag for adding a delay to cycle counter. 0=short 1-long
75       See the datasheet under "IDEL" for details.
76
77   interval
78       read-write, date
79       Interval timer value, represented as a date string. More typically will
80       be used as uinterval to read the actual elapsed seconds.
81
82   memory
83       read-write, binary
84       512 bytes of memory. The readonly/memory flag prevents further change.
85
86   pages/page.0 ... pages/page.15 pages/page.ALL
87       read-write, yes-no
88       Memory is split into 16 pages of 32  bytes  each.  The  readonly/memory
89       flag  prevents  further change.  ALL is an aggregate of the pages. Each
90       page is accessed sequentially.
91
92   readonly/[memory|clock|interval|cycle]
93       read-write, yes-no
94       Permanently protect part of the chip's function from alteration.
95
96       readonly/memory
97              page.X and memory
98
99       readonly/clock
100              date and udate
101
102       readonly/interval
103              interval
104
105       readonly/cycle
106              cycle
107
108   running
109       read-write, yes-no
110       State of the clock. 0=off 1=running.
111
112   set_alarm
113       read-write, unsigned integer (0-111)
114       Which of the alarm triggers are enabled in the DS2404 (3)
115       The set_alarm value is of the form CIR, where:
116
117       C      cycle counter alarm
118              0 no
119              1 yes
120
121       I      interval timer alarm
122              0 no
123              1 yes
124
125       R      real-time clock alarm
126              0 no
127              1 yes
128
129   start
130       read-write, yes-no
131       Flag for starting the interval counter operation if not in  auto  mode.
132       0=stop 1=start
133       See the datasheet for details.
134
135   trigger/[cycle,date,interval,udate,uinterval]
136       read-write,varies
137       Target value that will trigger the alarm if the corresponding set_alarm
138       field is set.
139       The format is the same as the similarly named  field  (i.e.   date  for
140       trigger/date )
141
142   udate
143       read-write, unsigned integer
144       Time  represented as a number.  udate increments once per second, while
145       running is on.
146       Usually set to unix time standard: number of seconds since Jan 1, 1970.
147       The date field will be the unix representation of udate and setting ei‐
148       ther will change the other.
149
150   uinterval
151       read-write, unsigned interval
152       Similar to the udate field, except corresponds to the interval value.
153

STANDARD PROPERTIES

155   address
156   r_address
157       read-only, ascii
158       The entire 64-bit unique ID. Given as  upper  case  hexadecimal  digits
159       (0-9A-F).
160       address starts with the family code
161       r address is the address in reverse order, which is often used in other
162       applications and labeling.
163
164   crc8
165       read-only, ascii
166       The 8-bit error correction portion. Uses cyclic redundancy check.  Com‐
167       puted  from the preceding 56 bits of the unique ID number. Given as up‐
168       per case hexadecimal digits (0-9A-F).
169
170   family
171       read-only, ascii
172       The 8-bit family code. Unique to each type of device.  Given  as  upper
173       case hexadecimal digits (0-9A-F).
174
175   id
176   r_id
177       read-only, ascii
178       The 48-bit middle portion of the unique ID number. Does not include the
179       family code or CRC. Given as upper case hexadecimal digits (0-9A-F).
180       r id is the id in reverse order, which is often used in other  applica‐
181       tions and labeling.
182
183   locator
184   r_locator
185       read-only, ascii
186       Uses  an  extension  of the 1-wire design from iButtonLink company that
187       associated 1-wire physical connections with a unique  1-wire  code.  If
188       the  connection is behind a Link Locator the locator will show a unique
189       8-byte number (16 character hexadecimal) starting with family code FE.
190       If no Link Locator is between the device and the  master,  the  locator
191       field will be all FF.
192       r locator is the locator in reverse order.
193
194   present (DEPRECATED)
195       read-only, yes-no
196       Is the device currently present on the 1-wire bus?
197
198   type
199       read-only, ascii
200       Part  name  assigned by Dallas Semi. E.g.  DS2401 Alternative packaging
201       (iButton vs chip) will not be distiguished.
202

ALARMS

204       None implemented.
205

DESCRIPTION

207   1-Wire
208       1-wire is a wiring protocol and series of devices designed and manufac‐
209       tured  by  Dallas  Semiconductor, Inc. The bus is a low-power low-speed
210       low-connector scheme where the data line can also provide power.
211
212       Each device is uniquely and unalterably  numbered  during  manufacture.
213       There  are a wide variety of devices, including memory, sensors (humid‐
214       ity, temperature, voltage, contact, current), switches, timers and data
215       loggers.  More complex devices (like thermocouple sensors) can be built
216       with these basic devices. There are also 1-wire devices that  have  en‐
217       cryption included.
218
219       The  1-wire  scheme uses a single bus master and multiple slaves on the
220       same wire. The bus master initiates all communication. The  slaves  can
221       be individually discovered and addressed using their unique ID.
222
223       Bus  masters come in a variety of configurations including serial, par‐
224       allel, i2c, network or USB adapters.
225
226   OWFS design
227       OWFS is a suite of programs that designed to make the  1-wire  bus  and
228       its  devices easily accessible. The underlying principle is to create a
229       virtual filesystem, with the unique ID being the directory, and the in‐
230       dividual  properties of the device are represented as simple files that
231       can be read and written.
232
233       Details of the individual slave or master design are  hidden  behind  a
234       consistent interface. The goal is to provide an easy set of tools for a
235       software designer to create monitoring or control  applications.  There
236       are some performance enhancements in the implementation, including data
237       caching, parallel access to bus masters, and aggregation of device com‐
238       munication.  Still the fundamental goal has been ease of use, flexibil‐
239       ity and correctness rather than speed.
240
241   DS1427 DS1994 DS2404 DS2404S
242       The DS1427 (3), DS1994 (3), DS2404  (3),  and  DS2404S  (3)  family  of
243       1-wire  devices includes clock functions, with timers, memory, counters
244       and alarms. It is possible to write-protect regians of memory. Uses in‐
245       clude software or hardware timing and control.
246
247   Chips
248       Both  the DS2404 (3) and DS2404S (3) have 1-wire and 3-wire interfaces,
249       which might be useful for transferring data between the 2  buses.  They
250       act  as  a  passive slave to both buses. The DS2404 (3) and DS2404S (3)
251       require an external source of power and an external crystal. They  also
252       offer a reset and 1HZ clock pin.
253
254   iButtons
255       Both the DS1427 and DS1994 offer the memory, alarms, and clock function
256       in iButton format. Because the iButton is a  complete  sealed  package,
257       battery  and  crystal are internal. Everything is access via the 1-wire
258       interface.
259

ADDRESSING

261       All 1-wire devices are factory assigned a unique 64-bit  address.  This
262       address is of the form:
263
264       Family Code
265              8 bits
266
267       Address
268              48 bits
269
270       CRC    8 bits
271
272       Addressing under OWFS is in hexadecimal, of form:
273
274              01.123456789ABC
275
276       where 01 is an example 8-bit family code, and 12345678ABC is an example
277       48 bit address.
278
279       The dot is optional, and the CRC code can  included.  If  included,  it
280       must be correct.
281

DATASHEET

283       http://pdfserv.maxim-ic.com/en/ds/DS2404.pdf
284       http://pdfserv.maxim-ic.com/en/ds/DS2404S-C01.pdf
285       http://pdfserv.maxim-ic.com/en/ds/DS1994.pdf
286       http://pdfserv.maxim-ic.com/en/ds/DS1427.pdf
287

SEE ALSO

289   Programs
290       owfs  (1)  owhttpd  (1)  owftpd  (1)  owserver (1) owdir (1) owread (1)
291       owwrite (1) owpresent (1) owtap (1)
292
293   Configuration and testing
294       owfs (5) owtap (1) owmon (1)
295
296   Language bindings
297       owtcl (3) owperl (3) owcapi (3)
298
299   Clocks
300       DS1427 (3) DS1904 (3) DS1994 (3) DS2404  (3)  DS2404S  (3)  DS2415  (3)
301       DS2417 (3)
302
303   ID
304       DS2401 (3) DS2411 (3) DS1990A (3)
305
306   Memory
307       DS1982  (3)  DS1985  (3)  DS1986  (3)  DS1991 (3) DS1992 (3) DS1993 (3)
308       DS1995 (3) DS1996 (3) DS2430A (3) DS2431  (3)  DS2433  (3)  DS2502  (3)
309       DS2506 (3) DS28E04 (3) DS28EC20 (3)
310
311   Switches
312       DS2405 (3) DS2406 (3) DS2408 (3) DS2409 (3) DS2413 (3) DS28EA00 (3) In‐
313       fernoEmbedded (3)
314
315   Temperature
316       DS1822 (3) DS1825 (3) DS1820 (3) DS18B20 (3)  DS18S20  (3)  DS1920  (3)
317       DS1921  (3) DS1821 (3) DS28EA00 (3) DS28E04 (3) EDS0064 (3) EDS0065 (3)
318       EDS0066 (3) EDS0067 (3) EDS0068 (3) EDS0071 (3)  EDS0072  (3)  MAX31826
319       (3)
320
321   Humidity
322       DS1922 (3) DS2438 (3) EDS0065 (3) EDS0068 (3)
323
324   Voltage
325       DS2450 (3)
326
327   Resistance
328       DS2890 (3)
329
330   Multifunction (current, voltage, temperature)
331       DS2436  (3)  DS2437  (3)  DS2438  (3)  DS2751 (3) DS2755 (3) DS2756 (3)
332       DS2760 (3) DS2770 (3) DS2780 (3) DS2781 (3) DS2788 (3) DS2784 (3)
333
334   Counter
335       DS2423 (3)
336
337   LCD Screen
338       LCD (3) DS2408 (3)
339
340   Crypto
341       DS1977 (3)
342
343   Pressure
344       DS2406 (3) TAI8570 (3) EDS0066 (3) EDS0068 (3)
345
346   Moisture
347       EEEF (3) DS2438 (3)
348

AVAILABILITY

350       http://www.owfs.org
351

AUTHOR

353       Paul Alfille (paul.alfille@gmail.com)
354
355
356
357OWFS Manpage                         2006                            DS2404(3)
Impressum