DS2409
072398 4/16
CONTROL FUNCTION COMMANDS
The “Control Function Flow Chart” (Figure 5) describes
the protocols necessary for controlling the main and
auxiliary output as well as the control output of the
DS2409. The 1–Wire Function Control section and the
Coupler Function Control section combine to interpret
the commands issued by the bus master and create the
correct control signals within the device. Depending on
the complexity of function to be exercised, the 1–byte
command code may require one or two more bytes
being sent by the bus master . Switching one branch on
implies that the other branch is automatically switched
off. At Power–on, both branches are switched of f. Each
command flow includes at least one byte of feedback
information for the bus master to check if the command
was understood and executed.
STATUS READ/WRITE [5Ah]
This command should be sent to the device after power-
ing up unless the default settings are adequate for the
application. Following the command code, the bus mas-
ter has to send the status control byte. The bus master
will then read the status info byte from the device. The
confirmation byte is identical to the status info byte.
Tables 1 and 2 show the bit assignments in both bytes.
At power–on the device will be in the auto–control mode
and the control output will be assigned to the main out-
put. The control output can be assigned to the auxiliary
output by setting bit 6 of the status control byte to a 1.
For manual operation of the control output one has to
select manual mode (bit 5 = 1). The value of bit 7 of the
status control byte will then determine the status of the
control output. A 1 for bit 7 will make the transistor con-
ducting, a 0 will turn it of f (non–conducting). To change
the status of the device, both bits 3 and 4 of the status
control byte have to be 0. Otherwise the settings will
remain unchanged. In any case, the status info byte will
reflect the currently valid settings including the changes
that might have been made with the status control byte.
The status info byte allows the bus master to verify the
actual status of each output (STAT, active/inactive, on/
off) and the static level at the main and auxiliary output
(LEVL, 1 for normal, 0 in case of a short). If a 1–Wire out-
put is inactive and a low–going edge is encountered dur-
ing this time, the DS2409 will set the event flag (EVNT)
in the status info byte. Each output has its own event
flag. The event flags are cleared with the All Lines Off
command. Bit 7 of the status info byte tells if the device is
in auto–control mode or manual mode. Depending on
the value of this bit, the information in bit 6 (CNTR.
STAT) either reports the association of the control out-
put to a particular output (auto–control mode) or the sta-
tus of the transistor at the control output.
STATUS CONTROL BYTE Table 1
DATA
X
76543210
X
R/W
MODE
0 – 2
3 – 4
5
don‘t care
Write control: both bits must be 0 to change
the status.
control output mode selection: 0 = auto–
control mode (default), 1 = manual mode
CNTR.
SEL. MODE R/W R/W XXX
CNTR.
SEL.
6control output association (auto–control
mode): 0 = main (default), 1 = auxiliary
DATA
X
7value to be written to control output
(manual mode only): don’t care otherwise
STATUS INFO BYTE Table 2
CNTR.
STAT
76543210
MAIN
STAT
MAIN
LEVL
AUX.
STAT
2
status of main output: 0 = active
(connected to bus master), 1 = inactive
voltage sensed at main output:
0 = low, 1 = high (see note)
status of auxiliary output: 0 = active
(connected to bus master), 1 = inactive
MODE
AUX.
LEVL
3voltage sensed at auxiliary output:
0 = low, 1 = high (see note)
EVNT
MAIN
4event flag for main output: 0 = no event,
1 = negative edge sensed since inactive
EVNT
AUX. EVNT
MAIN AUX.
LEVL AUX.
STAT MAIN
LEVL MAIN
STAT
0
1
EVNT
AUX.
5event flag for aux. output: 0 = no event,
1 = negative edge sensed since inactive
CNTR.
STAT
6if auto–control mode: control output
association, 0 = main, 1 = auxiliary
if manual mode: 0 = output transistor off,
1 = output transistor on
MODE
7control output mode: 0 = auto–control
mode, 1 = manual mode
Note: Data is valid only if the output is decoupled from
the 1–Wire input.
ALL LINES OFF [66h]
This command is used to deactivate the currently active
1–Wire output and to clear both event flags or to end a
discharge cycle initiated by the Discharge Lines com-
mand. Before issuing this command, one should read
the status and check the event flags of both, the main
and the auxiliary output. Otherwise one might inadver-
tently clear the event flag without having taken appropri-