1DS2408(3) One-Wire File System DS2408(3)
2
3
4
6 DS2408 - 1-Wire 8 Channel Addressable Switch
7
9 8 port switch
10
11 29 [.]XXXXXXXXXXXX[XX][/[ latch.[0-7|ALL|BYTE] |
12 LCD_M/[clear|home|screen|message] |
13 LCD_H/[clear|home|yxscreen|screen|message|onoff] | LCD_H/rede‐
14 fchar.[0-7|ALL] LCD_H/redefchar_hex.[0-7|ALL] | PIO.[0-7|ALL|BYTE] |
15 power | sensed.[0-7|ALL|BYTE] | strobe | por | set_alarm | out_of_test‐
16 mode | address | crc8 | id | locator | r_address | r_id | r_locator |
17 type ]]
18
20 29
21
23 latch.0 ... latch.7 latch.ALL latch.BYTE
24 read-write, binary
25 The 8 pins (PIO) latch a bit when their state changes, either exter‐
26 nally, or through a write to the pin.
27 Reading the latch property indicates that the latch has been set.
28 Writing "true" (non-zero) to ANY latch will reset them all. (This is
29 the hardware design).
30 ALL is all latch states, accessed simultaneously, comma separated.
31 BYTE references all channels simultaneously as a single byte. Channel 0
32 is bit 0.
33
34 PIO.0 ... PIO.7 PIO.ALL PIO.BYTE
35 read-write, yes-no
36 State of the open-drain output ( PIO ) pin. 0 = non-conducting (off), 1
37 = conducting (on).
38 Writing zero will turn off the switch, non-zero will turn on the
39 switch. Reading the PIO state will return the switch setting. To deter‐
40 mine the actual logic level at the switch, refer to the sensed.0 ...
41 sensed.7 sensed.ALL sensed.BYTE property.
42 ALL references all channels simultaneously, comma separated.
43 BYTE references all channels simultaneously as a single byte. Channel 0
44 is bit 0.
45
46 power
47 read-only, yes-no
48 Is the DS2408 powered parasitically (0) or separately on the Vcc pin
49 (1)?
50
51 sensed.0 ... sensed.7 sensed.ALL
52 read-only, yes-no
53 Logic level at the PIO pin. 0 = ground. 1 = high (~2.4V - 5V ). Really
54 makes sense only if the PIO state is set to zero (off), else will read
55 zero.
56 ALL references all channels simultaneously, comma separated.
57 BYTE references all channels simultaneously as a single byte. Channel 0
58 is bit 0.
59
60 strobe
61 read-write, yes-no
62 RSTZ Pin Mode Control. Configures RSTZ as either RST input or STRB out‐
63 put:
64
65 0 configured as RST input (default)
66
67 1 configured as STRB output
68
69 por
70 read-write, yes-no
71 Specifies whether the device has performed power-on reset. This bit can
72 only be cleared to 0 under software control. As long as this bit is 1
73 the device will allways respond to a conditional search.
74
75 out_of_testmode
76 write-only, yes-no
77 Write "1" to this property to make sure the device has been properly
78 initialized on startup.
79
80 The datasheet says that under some conditions the startup (power-up)
81 will leave the device in the "testmode" state. Any problems with "Chan‐
82 nel Access Write" will trigger this property automaticlly, but this
83 property makes explicit initialization possible as well.
84
85 set_alarm
86 read-write, integer unsigned (0-333333333)
87 A number consisting of 9 digits XYYYYYYYY, where:
88
89 X select source and logical term
90 0 PIO OR
91 1 latch OR
92 2 PIO AND
93 3 latch AND
94
95 Y select channel and polarity
96 0 Unselected (LOW)
97 1 Unselected (HIGH)
98 2 Selected LOW
99 3 Selected HIGH
100
101 All digits will be truncated to the 0-3 range. Leading zeroes are
102 optional. Low-order digit is channel 0.
103
104 Example:
105
106 100000033
107 Responds on Conditional Search when latch.1 or latch.0 are set
108 to 1.
109
110 222000000
111 Responds on Conditional Search when sensed.7 and sensed.6 are
112 set to 0.
113
114 000000000 (0)
115 Never responds to Conditional Search.
116
118 This mode uses the DS2408 attached to a Hitachi HD44780 LCD controller
119 in 4-bit mode. See DATASHEET for published details. Based on a commer‐
120 cial product from HobbyBoards by Erik Vickery.
121
122 LCD_H/clear
123 write-only, yes-no
124 This will clear the screen and place the cursor at the start.
125
126 LCD_H/home
127 write-only, yes-no
128 Positions the cursor in the home (upper left) position, but leaves the
129 current text intact.
130
131 LCD_H/screen
132 write-only, ascii text
133 Writes to the LCD screen at the current position.
134
135 LCD_H/screenyc
136 write-only, ascii text
137 Writes to an LCD screen at a specified location. The controller doesn't
138 know the true LCD dimensions, but typical selections are: 2x16 2x20
139 4x16 and 4x20.
140
141 Y (row)
142 range 1 to 2 (or 4)
143
144 X (column)
145 range 1 to 16 (or 20)
146
147 There are two formats allowed for the screenyx text, either ascii
148 (readable text) or a binary form.
149
150 2 binary bytes
151 The two first characters of the passed string have the line and
152 row: e.g. "\x02\x04string" perl string writes "string" at line 2
153 column 4.
154
155 ascii 2,12:
156 Two numbers giving line and row: Separate with a comma and end
157 with a colon e.g. "2,4:string" writes "string" at line 2 column
158 4.
159
160 ascii 12:
161 Single column number on the (default) first line: End with a
162 colon e.g. "12:string" writes "string" at line 1 column 12.
163
164 The positions are 1-based (i.e. the first position is 1,1).
165
166 LCD_H/onoff
167 write-only, unsigned
168 Sets several screen display functions. The selected choices should be
169 added together.
170
171 4 Display on
172
173 2 Cursor on
174
175 1 Cursor blinking
176
177 LCD_H/message
178 write-only, ascii text
179 Writes a message to the LCD screen after clearing the screen first.
180 This is the easiest way to display a message.
181
182 LCD_H/redefchar.0-7|ALL
183 write-only, binary
184 Redefines one of 8 user-designed character glyphs for the LCD screen
185 (5x8 pixels).
186
187 Each byte defines a horizontal line top to bottom. All 5 pixels corre‐
188 sponds to 0x1F and a blank line is 0x00.
189
190 Format is 8 binary bytes.
191
192 LCD_H/redefchar_hex.0-7|ALL
193 write-only, ascii
194 Redefines one of 8 user-designed character glyphs for the LCD screen
195 (5x8 pixels).
196
197 Each byte defines a horizontal line top to bottom. All 5 pixels corre‐
198 sponds to 0x1F and a blank line is 0x00.
199
200 Format is 8 hexidecomal bytes (16 characters).
201
203 This mode uses the DS2408 attached to a Hitachi HD44780 LCD controller
204 in 8-bit mode. See DATASHEET for published details. Based on a design
205 from Maxim and a commercial product from AAG.
206
207 LCD_M/clear
208 write-only, yes-no
209 This will clear the screen and place the cursor at the start.
210
211 LCD_M/home
212 write-only, yes-no
213 Positions the cursor in the home (upper left) position, but leaves the
214 current text intact.
215
216 LCD_M/screen
217 write-only, ascii text
218 Writes to the LCD screen at the current position.
219
220 LCD_M/screenyc
221 write-only, ascii text
222 Writes to an LCD screen at a specified location. The controller doesn't
223 know the true LCD dimensions, but typical selections are: 2x16 2x20
224 4x16 and 4x20.
225
226 Y (row)
227 range 1 to 2 (or 4)
228
229 X (column)
230 range 1 to 16 (or 20)
231
232 There are two formats allowed for the screenyx text, either ascii
233 (readable text) or a binary form.
234
235 2 binary bytes
236 The two first characters of the passed string have the line and
237 row: e.g. "\x02\x04string" perl string writes "string" at line 2
238 column 4.
239
240 ascii 2,12:
241 Two numbers giving line and row: Separate with a comma and end
242 with a colon e.g. "2,4:string" writes "string" at line 2 column
243 4.
244
245 ascii 12:
246 Single column number on the (default) first line: End with a
247 colon e.g. "12:string" writes "string" at line 1 column 12.
248
249 The positions are 1-based (i.e. the first position is 1,1).
250
251 LCD_M/onoff
252 write-only, unsigned
253 Sets several screen display functions. The selected choices should be
254 added together.
255
256 4 Display on
257
258 2 Cursor on
259
260 1 Cursor blinking
261
262 LCD_M/message
263 write-only, ascii text
264 Writes a message to the LCD screen after clearing the screen first.
265 This is the easiest way to display a message.
266
268 address
269 r_address
270 read-only, ascii
271 The entire 64-bit unique ID. Given as upper case hexidecimal digits
272 (0-9A-F).
273 address starts with the family code
274 r address is the address in reverse order, which is often used in other
275 applications and labeling.
276
277 crc8
278 read-only, ascii
279 The 8-bit error correction portion. Uses cyclic redundancy check. Com‐
280 puted from the preceding 56 bits of the unique ID number. Given as
281 upper case hexidecimal digits (0-9A-F).
282
283 family
284 read-only, ascii
285 The 8-bit family code. Unique to each type of device. Given as upper
286 case hexidecimal digits (0-9A-F).
287
288 id
289 r_id
290 read-only, ascii
291 The 48-bit middle portion of the unique ID number. Does not include the
292 family code or CRC. Given as upper case hexidecimal digits (0-9A-F).
293 r id is the id in reverse order, which is often used in other applica‐
294 tions and labeling.
295
296 locator
297 r_locator
298 read-only, ascii
299 Uses an extension of the 1-wire design from iButtonLink company that
300 associated 1-wire physical connections with a unique 1-wire code. If
301 the connection is behind a Link Locator the locator will show a unique
302 8-byte number (16 character hexidecimal) starting with family code FE.
303 If no Link Locator is between the device and the master, the locator
304 field will be all FF.
305 r locator is the locator in reverse order.
306
307 present (DEPRECATED)
308 read-only, yes-no
309 Is the device currently present on the 1-wire bus?
310
311 type
312 read-only, ascii
313 Part name assigned by Dallas Semi. E.g. DS2401 Alternative packaging
314 (iButton vs chip) will not be distiguished.
315
317 Use the set_alarm property to set the alarm triggering criteria.
318
320 1-Wire
321 1-wire is a wiring protocol and series of devices designed and manufac‐
322 tured by Dallas Semiconductor, Inc. The bus is a low-power low-speed
323 low-connector scheme where the data line can also provide power.
324
325 Each device is uniquely and unalterably numbered during manufacture.
326 There are a wide variety of devices, including memory, sensors (humid‐
327 ity, temperature, voltage, contact, current), switches, timers and data
328 loggers. More complex devices (like thermocouple sensors) can be built
329 with these basic devices. There are also 1-wire devices that have
330 encryption included.
331
332 The 1-wire scheme uses a single bus master and multiple slaves on the
333 same wire. The bus master initiates all communication. The slaves can
334 be individually discovered and addressed using their unique ID.
335
336 Bus masters come in a variety of configurations including serial, par‐
337 allel, i2c, network or USB adapters.
338
339 OWFS design
340 OWFS is a suite of programs that designed to make the 1-wire bus and
341 its devices easily accessible. The underlying principle is to create a
342 virtual filesystem, with the unique ID being the directory, and the
343 individual properties of the device are represented as simple files
344 that can be read and written.
345
346 Details of the individual slave or master design are hidden behind a
347 consistent interface. The goal is to provide an easy set of tools for a
348 software designer to create monitoring or control applications. There
349 are some performance enhancements in the implementation, including data
350 caching, parallel access to bus masters, and aggregation of device com‐
351 munication. Still the fundemental goal has been ease of use, flexibil‐
352 ity and correctness rather than speed.
353
354 DS2408
355 The DS2408 (3) allows control of other devices, like LEDs and relays.
356 It extends the DS2406 to 8 channels and includes memory.
357 Alternative switches include the DS2406, DS2407 and even DS2450
358
360 All 1-wire devices are factory assigned a unique 64-bit address. This
361 address is of the form:
362
363 Family Code
364 8 bits
365
366 Address
367 48 bits
368
369 CRC 8 bits
370
371 Addressing under OWFS is in hexidecimal, of form:
372
373 01.123456789ABC
374
375 where 01 is an example 8-bit family code, and 12345678ABC is an example
376 48 bit address.
377
378 The dot is optional, and the CRC code can included. If included, it
379 must be correct.
380
382 http://pdfserv.maxim-ic.com/en/ds/DS2408.pdf
383 http://www.hobby-boards.com/catalog/howto_lcd_driver.php
384 http://www.maxim-ic.com/appnotes.cfm/appnote_number/3286
385
387 Programs
388 owfs (1) owhttpd (1) owftpd (1) owserver (1) owdir (1) owread (1)
389 owwrite (1) owpresent (1) owtap (1)
390
391 Configuration and testing
392 owfs (5) owtap (1) owmon (1)
393
394 Language bindings
395 owtcl (3) owperl (3) owcapi (3)
396
397 Clocks
398 DS1427 (3) DS1904 (3) DS1994 (3) DS2404 (3) DS2404S (3) DS2415 (3)
399 DS2417 (3)
400
401 ID
402 DS2401 (3) DS2411 (3) DS1990A (3)
403
404 Memory
405 DS1982 (3) DS1985 (3) DS1986 (3) DS1991 (3) DS1992 (3) DS1993 (3)
406 DS1995 (3) DS1996 (3) DS2430A (3) DS2431 (3) DS2433 (3) DS2502 (3)
407 DS2506 (3) DS28E04 (3) DS28EC20 (3)
408
409 Switches
410 DS2405 (3) DS2406 (3) DS2408 (3) DS2409 (3) DS2413 (3) DS28EA00 (3)
411
412 Temperature
413 DS1822 (3) DS1825 (3) DS1820 (3) DS18B20 (3) DS18S20 (3) DS1920 (3)
414 DS1921 (3) DS1821 (3) DS28EA00 (3) DS28E04 (3) EDS0064 (3) EDS0065 (3)
415 EDS0066 (3) EDS0067 (3) EDS0068 (3) EDS0071 (3) EDS0072 (3) MAX31826
416 [1m(3)
417
418 Humidity
419 DS1922 (3) DS2438 (3) EDS0065 (3) EDS0068 (3)
420
421 Voltage
422 DS2450 (3)
423
424 Resistance
425 DS2890 (3)
426
427 Multifunction (current, voltage, temperature)
428 DS2436 (3) DS2437 (3) DS2438 (3) DS2751 (3) DS2755 (3) DS2756 (3)
429 DS2760 (3) DS2770 (3) DS2780 (3) DS2781 (3) DS2788 (3) DS2784 (3)
430
431 Counter
432 DS2423 (3)
433
434 LCD Screen
435 LCD (3) DS2408 (3)
436
437 Crypto
438 DS1977 (3)
439
440 Pressure
441 DS2406 (3) TAI8570 (3) EDS0066 (3) EDS0068 (3)
442
443 Moisture
444 EEEF (3) DS2438 (3)
445
447 http://www.owfs.org
448
450 Paul Alfille (paul.alfille@gmail.com)
451
452
453
454OWFS Manpage 2003 DS2408(3)