Dallas DS2490S Usb to 1-wire bridge chip Datasheet

PRELIMINARY
TM
USB to 1-Wire
DS2490
Bridge Chip
www.dalsemi.com
FEATURES
§
§
§
§
§
§
§
§
PIN ASSIGNMENT
Communicates at regular and Overdrive 1Wire speeds
Supports 12V EPROM programming and stiff
5V pullup for crypto iButton, sensors and
EEPROM
Slew rate controlled 1-Wire timing and active
pullup to accommodate long lines and reduce
radiation
Programmable 1-Wire timing and driver
characteristics accommodate a wide range of
MicroLAN configurations at regular speed
Smart 1-Wire protocol combines data and
control information without requiring extra
pins
High-speed 12 Mbps USB interface
Integrated USB-compliant transceiver
Supports USB remote wakeup to resume a
suspended host system
16-Pin SOIC
300-Mil
ORDERING INFORMATION
DS2490S
16-Pin SOIC
DESCRIPTION
The DS2490 is a bridge chip that enables communication between the Universal Serial Bus (USB) and a
1-Wire bus. It provides regular, overdrive and flexible 1-Wire communication speeds and a full-speed 12
Mbps connection to USB. USB vendor-specific commands defined in this specification are used to
control the DS2490 and communicate with attached 1-Wire devices. A functional block diagram of the
DS2490 is shown in Figure 1.
1 of 50
033199
DS2490
SIGNAL SUMMARY Table 1
SIGNAL NAME
VD
VPP
TYPE
PWR
PWR
VB
PWR
D+
D1-Wire
PMOD
I/O
I/O
I/O
I
O
SUSO
XI
XO
GND
NC
I
O
PWR
FUNCTION
Power supply input for digital and 1-Wire functions. Range: 5.0±10%
Power supply input for 1-Wire EPROM programming. Range:
12V±0.25V
Power supply input for USB functions. Range: 3.3V±10% supply
regulated from USB supplied VBUS.
USB data - non-inverted of differential data pair.
USB data - inverted signal of differential data pair.
1-Wire Input/Output.
Reserved for future use. Must be tied to GND.
Suspend Output - buffered USB suspend state output from USB device
controller. When LOW the USB is in an active non-suspended state,
when HIGH the USB has entered a suspended state. This is an open
drain output and requires an external pullup.
Crystal input. Use a 12.0 MHz, fundamental mode, parallel resonant
crystal. A 12.0 MHz CMOS clock source may also be used.
Crystal output. Connect to other side of crystal 1 if used.
Ground reference and ground return for 1-Wire bus.
No connect. For factory use or reserved, do not connect to these pins.
RELATED DOCUMENTS
This specification uses terms from and references or complies with the Universal Serial Bus
Specification, which may be obtained from the USB Implementers Forum web site: www.usb.org. The
USB specification is considered to be part of the DS2490 specification.
This specification uses several terms and acronyms associated with Dallas Semiconductor 1-Wire
products and technologies. For a detailed description of iButton technology and terms download the
Book of iButton Standards from the Dallas Semiconductor iButton web site: www.ibutton.com.
DOCUMENT ORGANIZATION
The remainder of this document is organized into the following major sections:
SECTION
OVERVIEW
1-WIRE I/F CONTROLLER
USB COMMUNICATION
MODE COMMANDS
CONTROL COMMANDS
COMMUNICATION COMMANDS
DEVICE FEEDBACK
Summary
Device functional summary and application examples
Edge control and timing diagrams of 1-Wire signals
Configuration model, core and vendor-specific command
summaries
Commands used to configure 1-Wire interface operational
characteristics
Commands used to control 1-Wire communication
command processing
Commands used to communicate with an attached 1-Wire
device
Technique to obtain device status information
2 of 50
033199
DS2490
USB TRANSCEIVER
OSCILLATOR
SUSPEND OUTPUT
ELECTRICAL CHARACTERISTICS
APPLICATION INFORMATION
APPENDIX 1
APPENDIX 2
APPENDIX 3
APPENDIX 4
Transceiver connection requirements
Oscillator connection requirements
SUSO signal operation and purpose
DC and AC specifications
HW and SW application information
CONTROL COMMANDS – USB setup packet encoding
COMMUNICATION COMMANDS - USB setup packet
encoding
MODE COMMANDS - USB setup packet encoding
USB command and command type constant codes
OVERVIEW
The DS2490 directly interfaces a USB port to a 1-Wire bus. As shown in Figure 1, the DS2490
incorporates a USB physical interface, a USB device controller coupled with a 1-Wire specific USB
function core, and a 1-Wire bus interface controller. The 1-Wire interface controller shapes the slopes of
the 1-Wire wave-forms, applies programming pulses or strong pullup to 5V, and reads the 1-Wire bus
using a non-TTL threshold to maximize the noise margin for best performance on large 1-Wire
MicroLAN networks. 1-Wire waveform timing is accurately controlled with a crystal-based oscillator.
The DS2490 also supports USB remote wakeup which enables the DS2490 based USB peripheral to send
resume signaling to a suspended host system. If the remote wakeup function is enabled and the host
system is in a suspended state, a 1-Wire device attachment will cause the DS2490 to perform a host
system wakeup and allow the 1-Wire device to be serviced.
DS2490 FUNCTIONAL BLOCK DIAGRAM Figure 1
SUSO
D+
D-
VB
USB
DESC
ROM
USB
XCVR
USB
DEVICE
CONTROLLER
PWR
CNTL
VD
OSC
XI
1-WIRE
I/F
CONTROLLER
EP
FIFOS
USB
1-WIRE
FUNCTION
CORE
XO
1-WIRE
CLK
GEN
GND
VPP
Typical application examples of the DS2490 are shown in Figure 2 (a-c). As shown in all the examples,
all host control and communication with the device is accomplished over a USB communication link. A
USB vendor-specific command set, as defined in this document, is used to select operational modes
(MODE commands), control command processing (CONTROL commands), and communicate over the
1-Wire interface (COMMUNICATION commands). Shown in Figure 2 example (a) is a DS2490 based
USB peripheral application. The peripheral function is a USB to 1-Wire adapter and provides both USB
and 1-Wire I/O connections. In this example the peripheral is attached to the USB enabled host computer
3 of 50
033199
DS2490
either directly at a root port or through a USB HUB. The 1-Wire bus interface provided by the DS2490
supports all 1-Wire devices manufactured by Dallas Semiconductor as well as the various 1-Wire bus
topologies simple multi-drop to complex MicroLAN. Example (b) and (c) in Figure 2 are variations of
example (a) in which the DS2490 is embedded in the host computer or a USB HUB.
DS2490 Application Examples Figure 2
1-WIRE INTERFACE CONTROLLER
1-Wire communication commands sent to the DS2490 are ultimately processed by the 1-Wire interface
controller. One of the tasks of the interface controller is to actively shape the edges of the 1-Wire
communication waveforms. This speeds up the recharging of the 1-Wire bus (rising edges) and reduces
ringing of long lines (falling edges). The circuitry for shaping rising edges is always active. The slew
rate of falling edges is actively controlled only at flexible speed and requires the parameter for slew rate
control being different from its power-on default value. See the MODE COMMANDS section for
parameter control and power-on defaults.
All Rising Edges
The active pullup of the rising edges reduces the rise time on the 1-Wire bus significantly compared to a
simple resistive pullup. Figure 3 shows how the DS2490 is involved in shaping a rising edge.
4 of 50
033199
DS2490
ACTIVE PULLUP Figure 3
t
5V
APUOT
V IAPTO
V IAPO
0V
1-Wire bus
is discharged
t2
t1
t3
The circuit operates as follows: At t1 the pulldown (induced by the DS2490 or a device on the bus) ends.
From this point on the 1-Wire bus is pulled high by the weak pullup current IWEAKPU provided by the
DS2490. The slope is determined by the load on the bus and the value of the pullup current. At t2 the
voltage crosses the threshold voltage VIAPO. Now the DS2490 switches over from the weak pullup
current IWEAKPU to the higher current IACTPU. As a consequence, the voltage on the bus now rises faster.
As the voltage on the bus crosses the threshold VIAPTO at t3, a timer is started. As long as this timer is on
(tAPUOT), the IACTPU current will continue to flow. After the timer is expired, the DS2490 will switch back
to the weak pullup current.
Falling Edges (DS2490-initiated)
Whenever the DS2490 begins pulling the 1-Wire bus low to initiate a time slot, for example, it first turns
off the weak pullup current IWEAKPU. Then, at regular and Overdrive speed it will generate a falling edge
at a slew rate of typically 15 V/µs. This value is acceptable for short 1-Wire busses and adequate for
communication at Overdrive speed. For MicroLAN networks of more than roughly 30 meters length,
flexible speed should always be used. One of the parameters that is adjustable at flexible speed is the
slew rate of DS2490-initiated falling edges. The effect of the slew rate control is shown in Figure 4.
SLEW RATE CONTROL Figure 4
tF
5V
Target for
long lines:
4 ± 0.5 µs
low slew rate
high slew rate
0.8 V
0V
1-Wire bus
is pulled up
t1
weak pull-up ends,
pull-down begins
As extensive tests have shown, MicroLAN networks at a length of up to 300 meters will perform best if
the fall time tF is in the range of 4 ± 0.5 µs. This translates into a slew rate of approximately 1 V/µs. This
slew rate is typically achieved by selecting a PULLDOWN SLEW RATE parameter code of 0x4 (see
MODE COMMANDS). If the actual measured fall time is longer than the target value, a parameter code
of 0x3 or lower should be used. If the fall time is shorter, a parameter code of 0x5 or higher should be
5 of 50
033199
DS2490
used. Once determined, the value code for the Pulldown Slew Rate Control parameter should be stored in
the host and always be loaded into the DS2490 after a power-on or master reset cycle.
1-WIRE TIMING DIAGRAMS
This section explains the waveforms generated by the DS2490 on the 1-Wire bus in detail. First the
communication wave forms such as the Reset/Presence Detect Sequence and the time slots are discussed.
After that follows a detailed description of the pulse function under various conditions. The wave forms
generated by the DS2490 may deviate slightly from specifications found in the “Book of DS19xx iButton
Standards” or in data sheets of 1-Wire slave devices. However, the DS2490 has been designed to ensure
that the timing requirements are met.
1-Wire Communication Wave Forms
One of the major features of the DS2490 is that it relieves the host from generating the timing of the 1Wire signals and sampling the 1-Wire bus at the appropriate times. The reset/presence detect sequence is
shown in Figure 5. This sequence is composed of four timing segments: the reset low time tRSTL, the
short/interrupt sampling offset tSI, the presence detect sampling offset tPDT and a delay time tFILL. The
timing segments tSI, tPDT and tFILL comprise the reset high time tRSTH where 1-Wire slave devices assert
their presence or interrupt pulse. During this time the DS2490 pulls the 1-Wire bus high with its weak
pullup current.
The values of all timing segments for all 1-Wire speed options are shown in the table. Since the
reset/presence sequence is slow compared to the time slots, the values for regular and flexible speed are
the same. Except for the falling edge of the presence pulse, all edges are controlled by the DS2490. The
shape of the uncontrolled falling edge is determined by the capacitance of the 1-Wire bus and the number,
speed and sink capability of the slave devices connected.
RESET/PRESENCE DETECT Figure 5
Speed
Regular
Overdrive
Flexible
tRSTL
512 µs
64 µs
512 µs
tSI
8 µs
2 µs
8 µs
tPDT
64 µs
8 µs
64 µs
tFILL
512 µs
64 µs
512 µs
tRSTH
584 µs
74 µs
584 µs
Upon executing a 1-WIRE RESET command (see COMMUNICATION COMMANDS), the DS2490
pulls the 1-Wire bus low for tRSTL and then lets it go back to 5V. The DS2490 will now wait for the
short/interrupt sampling offset tSI to expire and then test the voltage on the 1-Wire bus to determine if
there is a short or an interrupt signal. If there is no short or interrupt (as shown in the picture), the
6 of 50
033199
DS2490
DS2490 will wait for tPDT and test the voltage on the 1-Wire bus for a presence pulse. Regardless of the
result of the presence test, the DS2490 will then wait for tFILL to expire and then send the command
response byte to the host.
If the test for interrupt or short reveals a logic 0, the DS2490 will wait for 4096 µs and then test the 1Wire bus again. If a logic 0 is detected, the 1-Wire bus is shorted and the DS2490 feedback response for
the 1-WIRE RESET Communication Command will indicate a short detection. If a logic 1 is detected,
the device will wait for tFILL to expire, after which it will load the feedback response value for the 1WIRE RESET command with an Alarming Presence Pulse detect value. No additional testing for a
presence pulse will be done. The DS2490 will perform the short/interrupt testing as described also at
Overdrive speed, although interrupt signaling is only defined for regular speed.
A Write-1 and Read Data time slot is comprised of the segments tLOW1, tDSO and tHIGH. During Write-1
time slots, after the Write-1 low time tLOW1 is over, the DS2490 waits for the duration of the data sample
offset and then samples the voltage at the 1-Wire bus to read the response. After this, the waiting time
tHIGH1 must expire before the time slot is complete. A Write-0 time slot only consists of the two segments
tLOW0 and tREC0.
If the network is large or heavily loaded, flexible speed should be selected and the Write-1 low time
(tLOW1) should be extended to more than 8 µs to allow the 1-Wire bus to completely discharge. Since a
large or heavily loaded network needs more time to recharge, it is also recommended to delay sampling
the bus for reading. A higher Data Sample Offset value (tDSO) will increase the voltage margin and also
provide extra energy to the slave devices when generating a long series of Write-0 time slots. However,
the total of tLOW1 + tDSO should not exceed 22 µs. Otherwise the slave device responding may have
stopped pulling the bus low when transmitting a logic 0.
WRITE 1 AND READ DATA TIME SLOT Figure 6
Speed
Regular
Overdrive
Flexible*
tLOW1
8 µs
1 µs
8 to 15 µs
tDSO
6 µs
1 µs
3 to 10 µs
tHIGH1
54 µs
8 µs
54 µs
tSLOT
68 µs
10 µs
65 to 79 µs
*Power-up defaults for Flexible speed: tLOW1=12µs, tDSO=7µs
7 of 50
033199
DS2490
WRITE 0 TIME SLOT Figure 7
Speed
Regular
Overdrive
Flexible
tLOW0
62 µs
7 µs
62 µs
tREC0
6 µs
3 µs
3 to 10
µs
tSLOT
68 µs
10 µs
65 to 72
µs
*Power-up defaults for Flexible speed: tREC0=7µs
Pulse Wave Forms
The PULSE Communication Command can be used to generate either a strong pullup to 5V or 12V
programming pulse. The duration of the pulses are specified with the STRONG PULLUP DURATION
and PROG PULSE DURATION mode registers. Figure 8 and Figure 9 show timing of the two pulse
types. For predefined pulse durations, tSPU and tPP are known values, for semi-infinite and infinite
durations these pulse times vary and depend on the characteristics of attached 1-Wire devices and/or host
computer intervention. See the MODE COMMAND section for details on duration times. The
processing of a PULSE command is essentially the same, regardless if a strong pullup or a programming
pulse is specified. As shown in the figures, at t1 processing of the PULSE command begins, at t2 the
“pulse” ends.
For EPROM programming, only a single slave device should be connected to the 1-Wire bus and the
cable must be short, not to exceed a few meters. The slew rate of the rising and falling edge of the
programming pulse (“steep slopes”) is actively controlled by DS2490 as shown in Figure 9. Do not
attempt to generate a programming pulse with a non-EPROM device on the bus; this may damage the
device as well as the DS2490. In addition, a correct programming pulse can only be generated if the 12V
programming voltage is available at the VPP pin of the DS2490.
Certain applications may require a duration for a strong pullup or programming pulse that cannot be
realized using one of the predefined values (see MODE COMMANDS section for values). Selecting
infinite duration allows the host to generate pulses of any length. As a consequence, however, the host
becomes responsible to actively control the duration of the pulse. Failing to do so may require a poweron reset or master reset cycle of the DS2490. For this reason, infinite duration should only be used if
absolutely necessary. The HALT EXECUTION WHEN DONE or HALT EXECUTION WHEN IDLE
Control commands are used to terminate an infinite duration pulse. As before, processing the command
is essentially the same, regardless if it is for a strong pullup or a programming pulse.
8 of 50
033199
DS2490
STRONG PULLUP TO 5V, PREDEFINED DURATION Figure 8
12V PROGRAMMING PULSE, PREDEFINED DURATION Figure 9
USB COMMUNICATION
Communication with the DS2490 is performed using USB standard requests, also referred to as core
commands or requests in this document, and DS2490 vendor specific USB commands. All command
communication with the DS2490 is performed over the default control pipe. Non-command
communication, including 1-Wire device data I/O and DS2490 status information, occurs in a vendorspecific fashion over bulk and interrupt pipes. Configuration of the DS2490 USB controller is shown in
Figure 10. As shown, a Dallas Semiconductor vendor-specific 1-Wire device exists with a single 1-Wire
interface. The USB vendor-specific 1-Wire function of the DS2490 will be implemented and controlled
by the device driver at the device level of the device class hierarchy, i.e, vendor-specific commands will
be directed to the device level. Within the 1-Wire interface, four endpoints exist to control and
communicate with the device. Four alternate settings of the 1-Wire interface exist which correspond to
different operating modes for the endpoints. Endpoint and interface descriptions are summarized in the
following paragraphs.
The DS2490 provides USB remote wakeup capability. Per the USB specification, if a device supports
remote wakeup, it must also provide the ability to enable or disable the remote wakeup function. In
addition, the remote wakeup feature must be disabled as the power up default or device reset state. When
the remote wakeup feature is enabled, the DS2490 will send USB resume signaling to a suspended host
system upon detecting a 1-Wire device attachment. It then becomes the responsibility of host system
software to resume operation and to determine what servicing is required for the 1-Wire device.
9 of 50
033199
DS2490
USB CONFIGURATION Figure 10
DS2490 USB 1-WIRE DEVICE
USB HOST
1-WIRE INTERFACE
USB ENUMERATION
SYSTEM
SW
USB CONTROL
default pipe
EP0
1-WIRE MODE
1-WIRE CONTROL
1-WIRE COMMUNICATION
TOUCH DETECTION
interrupt pipe
EP1
DEVICE STATE
1-WIRE
CLIENT
bulk pipe
EP2
bulk pipe
EP3
1-WIRE
DATA I/O
USB PHYSICAL I/F
Endpoint (EP) Summary Description
EP0 is the endpoint for the bi-directional default control pipe. It is used for the USB enumeration
process, USB core request communication, and all DS2490 specific command communication.
EP1 is the endpoint for an interrupt pipe (Device to Host) and is used to relay DS2490 status register data
and specific command execution completion and/or error information to the host. It is also used to
inform the host of 1-Wire device-attach detection. The polling period requested for EP1 is either 10 mS
or 1 mS, depending on the alternate interface setting of the 1-Wire interface. The default polling period
for EP1 is 10 mS.
EP2 is an endpoint for a bulk data out pipe (Data from Host) and is used to transmit 1-Wire device data
from the host to the DS2490. The information received at this endpoint will be transmitted as data on the
1-Wire bus.
EP3 is an endpoint for a bulk data in pipe (Data to Host) and is used to send data received by the DS2490
from the 1-Wire bus back to the host for processing.
1-Wire Interface Summary Description
The interface is the USB collection point for the four endpoints. Four alternate settings exist for the 1Wire interface which correspond to different operational modes for the pipes to EP1, EP2, and EP3. As
shown in Table 2, the alternate settings specify different polling periods for the interrupt pipe and
different maximum packet sizes for the two bulk pipes.
10 of 50
033199
DS2490
1-Wire Interface Alternate Setting Summary Table 2
0
EP1
poll interval
10mS
EP2/EP3
max packet size
16 bytes
1
10mS
64 bytes
2
1mS
16 bytes
3
1mS
64 bytes
Alt Setting
Alternate Setting Description
Long interrupt polling interval, small packet size for
bulk pipes
Long interrupt polling interval, large packet size for
bulk pipes
Short interrupt polling interval, small packet size
for bulk pipes
Short interrupt polling interval, large packet size for
bulk pipes
Endpoint Feature Summary Table 3
Endpoint
#
0
1
Transaction
Type
CONTROL
INTERRUPT
Direction1
Max. Packet Size
IN/OUT
IN
2
BULK
OUT
3
BULK
IN
ALT I/F-0..3: 8 bytes
ALT I/F-0..3 32 bytes
ALT I/F-0:
16 bytes
ALT I/F-1:
64 bytes
ALT I/F-2:
16 bytes
ALT I/F-3:
64 bytes
ALT I/F-0:
16 bytes
ALT I/F-1:
64 bytes
ALT I/F-2:
16 bytes
ALT I/F-3:
64 bytes
1. Direction in this table is in reference to the Host
USB Core Commands Table 4
Standard Device Requests
SET_ADDRESS
SET_CONFIGURATION
GET_CONFIGURATION
GET_DESCIPTOR
GET_INTERFACE
SET_INTERFACE
SET_FEATURE
CLEAR_FEATURE
GET_STATUS
Target Element
Device
Device
Device
Device
Interface 0
Interface 0
Device
Device
Device, Interfaces,
Endpoints 0-3
11 of 50
Range
0x01 - 0xFF
0x00 - 0x01
0x00 - 0x01
Interface 0: 0x00 - 0x03
Interface 0: 0x00 - 0x03
Notes
1
2
3
3
4
4
5, 6
033199
DS2490
Notes:
1. The only valid configuration values are 0 and 1 for the SET_CONFIGURATION request.
Configuration value 0 corresponds to the non-configured state.
2. Only the DEVICE and CONFIGURATION descriptor types are supported for the
GET_DESCRIPTOR request.
3. Interface 0 is the only valid interface value for the DS2490.
4. The only valid feature selector for the command is DEVICE_REMOTE_WAKEUP.
5. The DS2490 is intended, at a minimum, to be partially bus powered. Remote wakeup can be enabled
or disabled. GET_STATUS requests to the device will return a logic 0 for the self-powered bit field
and the current state value for the remote wakeup bit.
6. There is no USB core level status information defined for interfaces. The DS2490 will always return
0 value data for GET_STATUS requests to interfaces.
DS2490 Vendor Specific USB Commands
Three different vendor-specific command types exist to control and communicate with the DS2490:
Control, Communication, and Mode. Control commands are used to manage various device functions
including the processing of communication commands, buffer clearing, and SW reset. Communication
commands are used for 1-Wire data and command I/O. Mode commands are used to establish the 1-Wire
operational characteristics of the DS2490 such as slew rate, low time, strong pullup, etc. Control,
Communication and Mode commands, like USB core requests, are communicated over the default control
pipe at EP0. With one exception as noted below, each command and any associated parameter data are
individually formatted into the 8-byte control transfer setup packet as follows:
bmRequestType
bRequest
wValue*
wIndex
wLength
Request type bit map
Command Type
Command
Command Parameters 0x0000
(1 byte)
(1 byte)
(2 bytes)
(2 bytes)
(not used)
*The one exception to wValue formatting is for the READ STRAIGHT Communication command. This
command requires three parameter bytes which exceeds the 2-byte parameter encoding space available in
the wIndex field. For this command only, the wValue field will be formatted as 1 command byte and 1
parameter byte. See the command description in Appendix 2 for details.
The bit-mapped bmRequestType field identifies the characteristics of the USB command per Chapter 9
of the USB Specification. Fields included in this command describe the direction of the transfer, type of
request (core, class, or vendor specific) and the target of the command recipient (device, interface, or
endpoint). The only variation on the bmRequestType field for the different DS2490 vendor-specific
command will be for the transfer direction: host to device, or device to host; the recipient for all
commands will be the “device”.
The bRequest field contains a 1-byte constant identifying which of the three supported DS2490
command types is being sent. The command constants are defined in Appendix 4 and are summarized as
follows:
Command Type
CONTROL_CMD
COMM_CMD
MODE_CMD
Description
1-Wire interface control commands
1-Wire interface communication commands
1-Wire interface operational mode commands
The 2-byte wValue field is encoded with the specific command. For Control and Mode commands, the
field value corresponds to a specific command constant as defined in Appendix 4. For Communication
12 of 50
033199
DS2490
commands, the field has additional embedded command parameters as indicated in Appendix 2. The
exception is the READ STRAIGHT command as described previously.
The 2-byte wIndex is used to hold additional command parameter data when required by the specific
command.
The wLength field is used in the control transfer setup packet to specify the number of bytes to be sent
during the data stage of a control transfer. The “GET COMM CMDS” control command is the only
DS2490 command that uses the data stage of the control transfer. Typically all command data is
embedded in the setup stage. Except for the GET COMM CMDS, this field must be set to 0x0000.
DS2490 Control, Communication, and Mode vendor-specific command descriptions and formatting are
defined in Appendices 1, 2, and 3. Vendor-specific commands not defined in the appendices are not
supported by the DS2490 and the device will respond with a STALL if an unsupported command is
received.
MODE COMMANDS
DS2490 1-Wire characteristics and features (speed, durations, slew rate, etc.) are controlled with discrete
Mode commands and/or embedded Communication command parameters. Parameter values and
enable/disable settings are used for characteristic control. Mode settings are stored in the DS2490 State
Registers and can be read at any time or at the polling interval of EP1. See the section “DEVICE
FEEDBACK” for State Register details.
Enable/disable settings are used to control three global features:
§ Strong pullup to +5V
§ +12V EPROM programming pulse
§ Dynamic 1-Wire bus communication speed change through a communication command
The setting for these three global controls are accessible only through Mode commands; the features are
either enabled or disabled with the appropriate Mode command. Specific Communication commands
exist which can be used to issue a strong pullup, programming pulse, or speed change. When the
corresponding setting is enabled the feature is usable as part of a communication command when disabled
the feature is not usable.
Parameter values and codes are used to specify and control 1-Wire bus characteristics:
§ 1-Wire bus communication speed
§ +5V strong pullup duration
§ +12V programming pulse duration
§ Pulldown slew rate
§ Write-1 low time
§ Data sample offset/ Write-0 Recovery time
These six settings are controllable with discrete Mode commands or as embedded command/parameter
values in Communications commands.
As listed in Table 5 and summarized previously, there are eight Mode commands. The USB control
transfer setup packet coding to transmit these commands is detailed in Appendix 3. Mode commands are
immediately processed by the DS2490 when they are received. The DS2490 power-on default values for
13 of 50
033199
DS2490
these parameters are as listed in Table 10. Each command and parameter control is detailed in the
following paragraphs.
Mode Command Set Summary Table 5
Command
ENABLE PULSE
ENABLE SPEED
CHANGE
1-WIRE SPEED
STRONG PULLUP
DURATION
PULLDOWN SLEW
RATE
PROG PULSE
DURATION
WRITE-1 LOW TIME
DSOW0 RECOVERY
TIME
Function
Enable/disable 1-Wire strong pullup pulse to 5V and/or +12V programming
pulse.
Enable/disable dynamic change of the 1-Wire speed through a
communication command.
Communication speed of the 1-Wire bus.
Duration of 1-Wire strong pullup.
Slew rate of 1-Wire pulldown.
Duration of 1-Wire VPP EPROM programming pulse.
Duration of 1-Wire Write-1 low time.
Recovery time for the 1-Wire data sample offset / Write-0 transaction.
Mode Command Set Descriptions:
ENABLE PULSE – This command is used to enable or disable a 1-Wire strong pullup pulse to 5V
and/or +12V EPROM programming pulse. Two bit positions in the parameter byte are used to control the
enabled/disabled state for each pulse type. The specific pulse is enabled when the respective bit is set to a
1 and disabled when set to a 0. The DS2490 power-up default state for both strong pullup and
programming pulse is disabled.
ENABLE SPEED CHANGE - This command is used to enable or disable a 1-Wire communication
speed change. Enabled when a TRUE parameter value is passed with the command, disabled with a
FALSE. The DS2490 power-up default state for speed change is disabled.
1-WIRE SPEED - This command is used to set the speed of 1-Wire communication; three settings are
possible. The parameter codes to select the desired or required speed are as listed in Table 6. As shown,
speed codes 0x3..0xF are undefined. The DS2490 decodes the 3 LSBs of the 1-Wire speed code. Sending
a code other than the defined values in Table 6 will result in undefined behavior. The DS2490 power-up
default communication speed is regular.
1-Wire Bus Speed Codes Table 6
Code
0x0
0x1
Speed
Regular
Flexible
0x2
0x3..0xF
Overdrive
reserved
Data Rate
65 µs time slot (15.4 kbps)
65- 72 µs time slot (13.9 to
15.4 kbps)
10 µs time slot (100 kbps)
undefined
14 of 50
033199
DS2490
STRONG PULLUP DURATION - This command is used to set the time duration of a 1-Wire strong
Pullup. The time is controlled with an unsigned 8-bit binary number between 0x00 and 0xFE which
specifies the duration in multiples of 16 ms. A value of 0x01 specifies 16 ms, 0x02 equals 32 ms, etc. A
value of 0x00 specifies infinite duration. To terminate an infinite duration pullup use either the HALT
EXECUTION WHEN DONE or HALT EXECUTION WHEN IDLE Control commands as described in
Appendix 1. A value of 0xFF specifies semi-indefinite duration. For a semi-indefinite duration, the
strong pullup will end as soon as the current has dropped below 500 µA ± 50%. The current is sensed
every 16 ms. The DS2490 power-up default strong pullup duration register value is 512 ms.
PROG PULSE DURATION - This command is used to set the time duration of a 1-Wire Programming
Pulse. The time is controlled with a an unsigned 8-bit binary number between 0x00 and 0xFE specifying
the duration in multiples of 8 µs. A value of 0x00 stands for infinite duration. To terminate an infinite
duration programming pulse use the HALT EXECUTION WHEN DONE or HALT EXECUTION
WHEN IDLE command. A value of 0xFF stands for semi-indefinite duration. The pulse will end as soon
as the current has dropped below 500 µA ± 50%. The current is sensed every 8 µs. The pulse will also
terminate if the voltage sensed on the 1-Wire bus remains too low. The DS2490 power-up default strong
pullup duration register value is 512 µS.
PULLDOWN SLEW RATE - This command is used to select the pulldown slew rate for 1-Wire bus
Flexible Speed operation; eight pulldown slew rates are possible. The parameter codes to select the
desired or required slew rate are as listed in Table 7. The slew rate numbers in the table represent typical
values. The pulldown slew rate for Regular speed is 0.83 V/µs and for Overdrive speeds it is 15 V/µs.
The DS2490 decodes the 3 LSBs of the slew rate code. Sending a code other than the defined values in
Table 7 will result in undefined behavior. The DS2490 pulldown slew rate power-up default value for
Flexible speed is 0.83 V/µs.
Flexible Speed PullDown Slew Rate Codes Table 7
Code
0x0
0x1
0x2
0x3
0x4
0x5
0x6
0x7
0x8..0xF
Pulldown slew rate
15 V/µs
2.20 V/µs
1.65 V/µs
1.37 V/µs
1.10 V/µs
0.83 V/µs
0.70 V/µs
0.55 V/µs
reserved
WRITE-1 LOW TIME - This command is used to select the Write-1 low time for 1-Wire bus Flexible
speed operation; eight Write-1 low time durations are possible. The parameter codes to select the desired
or required low time are as listed in Table 8. The low time numbers in the table represent exact values.
The Write-1 Low Time for Regular speed is 8 µs, at Overdrive speed it is 1 µs. The DS2490 decodes the
3 LSBs of the low time code. Sending a code other than the defined values in Table 8 will result in
undefined behavior. The DS2490 Write-1 Low Time power-up default value for Flexible speed is 12 µs.
15 of 50
033199
DS2490
Flexible Speed Write-1 Low Time Codes Table 8
Code
0x0
0x1
0x2
0x3
0x4
0x5
0x6
0x7
0x8..0xF
Write-1 Low Time
8 µs
9 µs
10 µs
11 µs
12 µs
13 µs
14 µs
15 µs
reserved
DSOW0 RECOVERY TIME - This command is used to select the Data Sample Offset / Write-0
recovery time (DSO/W0R) for 1-Wire bus Flexible Speed operation; eight DSO/W0R times are possible.
The parameter codes to select the desired or required recovery time are as listed in Table 9. The numbers
in the table represent exact values. The DSO/W0R time for Regular speed is 3 µs, for Overdrive speed
the Data Sample Offset is 1µs and the Write-0 Recovery Time is 3 µs. The DS2490 decodes the 3 LSBs
of the DSO/W0R code. Sending a code other than the defined values in Table 9 will result in undefined
behavior. The DS2490 DSO/W0R power-up default value for Flexible speed is 7 µs.
Flexible Speed DSO/ W0R Time Codes Table 9
Code
0x0
0x1
0x2
0x3
0x4
0x5
0x6
0x7
0x8..0xF
DSO/W0R Time
3 µs
4 µs
5 µs
6 µs
7 µs
8 µs
9 µs
10 µs
reserved
Power-on Default Mode Values
Table 10 summarizes the power-up default values for the various DS2490 mode registers. Note that the
power-up default communication speed is regular and several of the values listed in Table 10 are specific
to Flexible speed operation. To change a value the appropriate Mode or Communication command must
be sent to the device.
16 of 50
033199
DS2490
1-Wire Power-On Default Modes Table 10
Setting/Parameter
Strong pullup to 5V
12V Programming Pulse
Dynamic Speed Change
1-Wire Bus Communication Speed
+5V Strong Pullup Duration
+12V Programming Pulse Duration
Pulldown Slew Rate Control
Write-1 Low Time
Data Sample Offset / Write-0 Recovery Time
Power-On Default Value
FALSE
FALSE
FALSE
0x0 (Regular Speed, ~16 kbps)
0x20 (512 ms)
0x40 (512 µs)
0x5 (0.83 V/µs)
0x4 (12µs)
0x4 (7µs)
CONTROL COMMANDS
DS2490 Control commands are used to control the processing of Communication commands/data and can
also be used to issue a device Reset. As listed in Table 11 there are 11 Control commands. The USB
control transfer setup packet coding to transmit these commands is detailed in Appendix 1. Like Mode
commands, Control commands are immediately processed by the DS2490 when they are received.
17 of 50
033199
DS2490
Control Command Set Summary Table 11
Command
RESET DEVICE
START EXECUTION
RESUME EXECUTION
HALT EXECUTION WHEN
IDLE
HALT EXECUTION WHEN
DONE
CANCEL COMMAND
CANCEL MACRO
FLUSH COMM CMDS
FLUSH DATA RCV BUFFER
FLUSH DATA XMT BUFFER
GET COMM CMDS
Function
Perform a hardware reset.
Start execution of Communication commands.
Resume execution of Communication commands.
Halt Communication command execution when the 1-Wire bus is
idle.
Halt further Communication command execution when the current
command execution completes.
Terminate Communication command execution.
Terminate Communication command macro execution.
Clear unexecuted Communication commands from the command
buffer.
Clear the data receive buffer (data from a 1-Wire device).
Clear the data transmit buffer (data to a 1-Wire device).
Retrieve unexecuted Communication commands from the command
buffer.
Control Command Set Descriptions:
RESET DEVICE –This command performs a hardware reset equivalent to the power-on reset. This
includes clearing all endpoint buffers and loading the Mode control registers with their default values.
START EXECUTION – This command starts execution of Communication commands. This command
is also required to start the execution of Communication commands with an IM (immediate execution
control) bit set to logic 0.
RESUME EXECUTION – This command is used to resume execution of a Communication command
that was halted with either of the HALT EXECUTION commands.
HALT EXECUTION WHEN IDLE – This command is used to halt the execution of the current
Communication command after the 1-Wire bus has returned to the idle state. Further Communication
command processing is stopped until a RESUME EXECUTION command is received. This command,
or the HALT EXECUTION WHEN DONE command, is also used to terminate a strong pullup or
programming pulse of semi-infinite or infinite duration.
HALT EXECUTION WHEN DONE – This command is used to halt the execution of a
Communication command after the current command execution is complete. Further Communication
command processing is stopped until a RESUME EXECUTION command is received. This command,
or the HALT EXECUTION WHEN IDLE command, is also used to terminate a strong pullup or
programming pulse of semi-infinite or infinite duration.
CANCEL COMMAND – This command is used to terminate the Communication command that is
currently being executed and place the 1-Wire bus in an idle state. Further Communication command
processing is stopped until a START EXECUTION command is received. The canceled Communication
command cannot be resumed. The DS2490 must be in a halted state before the CANCEL COMMAND
command can be processed, if not, the command will be ignored.
18 of 50
033199
DS2490
CANCEL MACRO - This command is used to terminate any activity on the 1-Wire bus without
completing the Communication command or macro that is currently being executed and to place the 1Wire bus in an idle state. The command processing pointer is positioned at the communication command
that follows the set of commands that make up the macro. Further Communication command processing
is stopped until a START EXECUTION command is received. The DS2490 must be in a halted state
before the CANCEL MACRO command can be processed; if not, the command will be ignored.
FLUSH COMM CMDS - This command is used to clear all unexecuted Communication commands
from the command FIFO. The DS2490 must be in a halted state before the FLUSH COMM CMDS
command can be processed.
FLUSH DATA RCV BUFFER - This command is used to clear EP3 receive data FIFO (data from 1Wire device). The DS2490 must be in a halted state before the FLUSH DATA RCV BUFFER command
can be processed.
FLUSH DATA XMT BUFFER - This command is used to clear EP2 transmit data FIFO (data to 1-Wire
device). The DS2490 must be in a halted state before the FLUSH DATA XMT BUFFER command can
be processed.
GET COMM CMDS - This command is used to retrieve unexecuted Communication commands and
parameters from the command FIFO. The DS2490 must be in a halted state before the GET COMM
CMDS command can be processed. Unexecuted commands are returned over EP0 in the control transfer
data phase. Host software is responsible for determining the number of command/parameter bytes to be
returned and specifying the value in the wLength field of the control transfer setup packet.
Commands/parameters are deleted from the FIFO as they are transmitted to the host; the command
pointer used with the FIFO is updated as values are read. Any commands/parameters that are not
transferred remain in the FIFO and will be processed when command execution resumes. If the wLength
value passed is larger than the number of command/parameter bytes, the DS2490 will terminate the
control transfer with a short data packet.
COMMUNICATION COMMANDS
Communication commands are used to communicate with and control an attached 1-Wire device(s).
There are 16 commands as summarized in Table 12. Communication commands also contain embedded
command bits for conditional control or additional functionality. Appendix 2 details the embedded
command bit purpose/formatting as well as the control transfer setup packet coding to transmit the
command/parameter data to the DS2490.
Unlike Mode and Control commands, Communication command processing is controlled by host
software by combining embedded command bits with Control commands. For example, a command
macro form is supported in which several Communication commands and parameter data are
sent/buffered in the DS2490 and then processed as a group. Embedded command bit ICP is used to
create macro command sets. Also unlike Mode and Control commands, several forms of Communication
command monitoring exists for host software to track processing progress. If an error condition is
detected during command processing and the embedded ICP bit is set to the proper state or the ERROR
ESCAPE command is used, a Result Register value will be generated with an error indication. Note that
a Result Register value will not be generated if no error condition is detected. Communication command
buffer (FIFO) status and 1-Wire data transmit/received buffers (EP2/3 FIFOs) status can also be
19 of 50
033199
DS2490
monitored via the State Registers. See the section “DEVICE FEEDBACK” for details on command
monitoring.
Communication Command Set Summary Table 12
Command
ERROR ESCAPE
SET DURATION
PULSE
1-WIRE RESET
BIT I/O
BYTE I/O
BLOCK I/O
MATCH ACCESS
READ STRAIGHT
DO & RELEASE
SET PATH
WRITE SRAM PAGE
WRITE EPROM
READ CRC PROT PAGE
READ REDIRECT PAGE
W/CRC
SEARCH ACCESS
Function
Escape from macro on error.
Change duration of strong pullup or programming pulse.
Perform strong pullup or generate programming pulse.
Generate 1-Wire reset pulse.
1-Wire single data bit I/O.
1-Wire data byte I/O.
1-Wire data block I/O.
Address a device on the 1-Wire bus.
Transmit a data preamble and read back data.
Control Crytpo iButton CPU activity.
Activate a series of couplers that provide access to a target 1-Wire
device.
Write data to the scratchpad of a 1-Wire SRAM device.
Write data directly to the data or status memory of a 1-Wire EPROM
device.
Read CRC protected pages of a 1-Wire EPROM device or tamperdetect bytes and counter value of Monetary iButtons.
Read a single page of data and check the CRC. Follow page
redirections if set.
Access a device using the Search ROM command or identifying
devices on the active segments of a MicroLAN.
Communication Command Set Descriptions:
ERROR ESCAPE - This command can be placed between commands in a macro. If an error condition
occurred when executing the Communication command prior to the ERROR ESCAPE command, further
Communication command processing will be stopped and a Result Register processing error indication
byte will be loaded in the feedback data buffer to be sent to the host. (See the section “DEVICE
FEEDBACK” and Table 17 for a Result Register description.) If an error condition was detected, host
intervention is required to recover from the ERROR ESCAPE state. If no error occurred, the command is
processed as a NO OPERATION. Embedded command bit RST enables a 1-Wire reset before the
command executes.
Note: The ERROR ESACAPE command should not be used as the last command of a macro. Nor
should the ERROR ESCAPE command be used between individual communication commands; it should
only be used within a macro command set. If this requirement is violated and the ERROR ESCAPE
command is used as the last macro command or between individual instructions, the potential exists for
the maco or individual instruction following the ERROR ESCAPE to be skipped and purged from
command FIFOs. Additionally, it is not necessary since, by requirement, the last macro command must
have it’s embedded ICP bit set to (ICP=1, see APPENDIX 2 for command coding); this will force error
reporting.
20 of 50
033199
DS2490
Command parameters:
EP2 data:
EP3 data:
Result Register:
None.
None.
None.
Code
EOS, RDP,
CRC, CMP,
VPP, APP, SH,
NRS
None.
Condition
Error during execution of the previous command.
No error occurred during execution of the previous
command.
SET DURATION - This command changes the State Register pulse duration value for either the +12V
programming pulse or strong pullup. The new duration value is loaded into the duration register specified
by the TYPE embedded command parameter as detailed in Appendix 2. See section “MODE
COMMANDS” for duration parameter value setting. The duration values can alternatively be changed
using a Mode command.
Note: An infinite duration pulse is terminated by using either of the HALT EXECUTION Control
commands. To resume 1-Wire activity after the termination, use the RESUME EXECUTION Control
command.
1 byte specifying the new duration.
Command parameters:
None, this command gets its input data as a command parameter.
EP2 data:
None.
EP3 data:
None, this command returns no error code.
Result Register:
PULSE - This command is used to temporarily pull the 1-Wire bus to +12V in order to program an
EPROM device or to generate a strong pullup to 5V in order to provide extra power for an attached
iButton device, e.g., temperature sensor or crypto iButton. The embedded TYPE parameter bit specifies
the pulse type. The pulse duration is determined by the value in the respective mode register,
programming pulse or strong pullup. The 12VP bit in the Device Status Flags (bit2) is used to determine
whether +12V VPP programming voltage is present, see Table 15.
None.
Command parameters:
None.
EP2 data:
None.
EP3 data:
Result Register:
Code
Condition
VPP.
ICP=0 and no +12V was sensed.
Non.
Otherwise.
1-WIRE RESET - This command is used to generate a reset pulse on the 1-Wire bus and to optionally
change the 1-Wire speed. The new speed will take effect only if the embedded command bit SE is set to
1. When the 1-WIRE RESET is sent after an Overdrive Skip ROM command, SE must be 1 and the new
speed must be 0x02. See MODE CONTROL section for additional communication speed information.
To switch back to regular speed, set SE=1 and the new speed parameter to 0x00 (regular) or 0x01
(flexible).
1 byte specifying new speed after the reset.
Command parameters:
None.
EP2 data:
21 of 50
033199
DS2490
None.
Code
SH, NRS.
None.
EP3 data:
Result Register:
Condition
ICP=0 and an abnormal condition.
Otherwise.
BIT I/O - This command generates a single time slot on the 1-Wire bus and reads back the response.
Data bit d3 (D) of command byte 1 specifies the value to be written to the 1-Wire bus. This time slot may
optionally be followed by a strong pullup using embedded command bits SPU and CIB. With CIB=1, a
requested strong pullup will only occur if the read-back revealed a 0. Data is returned to the host only if
the embedded command bit ICP=0. If ICP=0, the bit read from the 1-Wire device is stored in the EP3
FIFO and is read by the host using an EP3 bulk transaction. The bit read back is stored in the data byte
LSB as shown in Table 13.
None.
Command parameters:
None, this command gets its input data as a command parameter.
EP2 data:
EP3 data:
Length Description
If ICP=0: 1 byte
Bit read back from the 1-Wire device.
If ICP=1: None.
No data is returned.
None, this command returns no error code.
Result Register:
BIT I/O Read Back Byte Table 13
bit7
0
bit6
0
bit5
0
bit4
0
bit3
0
bit2
0
bit1
0
bit0
D
BYTE I/O - This command accomplishes a direct 1-Wire write and read with optional strong pullup after
the last bit of the byte. The optional strong pullup is controlled using embedded command bit SPU. For
a write sequence, the data byte to be written is included in the command setup packet as shown in
Appendix 2. For a read sequence the setup packet data byte value is set to 0xFF. Data is returned to the
host only if the embedded command bit ICP=0. If ICP=0, the byte read from the 1-Wire device is stored
in the EP3 FIFO and is read by the host using a EP3 bulk transaction.
1 byte: Data byte to be sent to the 1-Wire bus. To read only, the byte
Command parameters:
should be 0xFF.
None, this command gets its input data as a command parameter.
EP2 data:
EP3 data:
Length Description
If ICP=0: 1 byte
Byte read back from the 1-Wire device.
If ICP=1: None
No data is returned.
None, this command returns no error code.
Result Register:
BLOCK I/O - This command accomplishes a direct 1-Wire write or read with optional strong pullup
after the last byte of the block. The optional strong pullup is controlled using embedded command bit
SPU. Embedded command bit RST enables a 1-Wire reset before the command executes. To accomplish
a READ function all input data should be 0xFF, otherwise the data read from the 1-Wire bus will be
masked. For a block write sequence the EP2 FIFO must be pre-filled with data before command
execution. Additionally, for block sizes greater then the FIFO size, the FIFO content status must be
monitored by host SW so that additional data can be sent to the FIFO when necessary. A similar EP3
FIFO content monitoring requirement exists for block read sequences. During a block read the number of
22 of 50
033199
DS2490
bytes loaded into the EP3 FIFO must be monitored so that the data can be read before the FIFO
overflows. See the HW/SW APPLICATION RECOMMENDATION section for additional details.
2 bytes specifying block size.
Command parameters:
EP2 data:
Length
Description
Same as
Data block to be written to the 1-Wire device.
block size
EP3 data:
Length
Description
Same as
Data block read from the 1-Wire device.
block size
None, this command returns no error code.
Result Register:
MATCH ACCESS - This command is used to address a device on the active section of the 1-Wire bus
using the Match ROM or Overdrive Match command code. The EP2 FIFO must be pre-filled with the 8
bytes target ROM ID before command execution. Embedded command bit RST enables a 1-Wire reset
before the command executes, and embedded command bit SE enables a 1-Wire speed change that takes
effect before the command executes.
2 bytes: match command byte, new 1-Wire speed byte (optional).
Command parameters:
EP2 data:
Length
Description
8 bytes
ROM ID of the device to be accessed.
None
EP3 data:
None, this command returns no error code.
Result Register:
READ STRAIGHT - This command transmits a user-specified preamble of data to the 1-Wire bus and
then reads back as many bytes as specified. The preamble typically consists of a 1-Wire command code
followed by TA1 and TA2. It is possible to include a Match ROM command and ROM ID in the
preamble to also address a device at the current speed. This command can also be used to copy the
scratchpad or disconnect a path. Embedded command bit RST enables a 1-Wire reset before the
command executes. The EP2 FIFO must be pre-filled with preamble data before command execution.
Additionally, for preamble sizes greater then the FIFO size, the FIFO content status must be monitored by
host SW so that additional data can be sent to the FIFO when necessary. A similar EP3 FIFO content
monitoring requirement exists for the block read. During a block read the number of bytes loaded into
the EP3 FIFO must be monitored so that the data can be read before the FIFO overflows. See the
HW/SW APPLICATION RECOMMENDATION section for additional details.
3 bytes: 2-byte parameter specifying block read size, byte specifying
Command parameters:
preamble size.
EP2 data:
Length
Description
Same as
Preamble data to be written to the 1-Wire device.
preamble size
EP3 data:
Length
Description
Same as
Data block read from the 1-Wire device.
block size
None, this command returns no error code.
Result Register:
DO & RELEASE - This command is typically used to control the activity of the CPU of the crypto
iButton, which requires a release sequence. This command can also be used to read from or write to the
I/O buffer or Status Register of the crypto iButton. A short preamble (3 bytes) consists of a 1-Wire
23 of 50
033199
DS2490
command code followed by the release sequence. A four-byte preamble with embedded command bit R
= 1 consists of a 1-Wire command code followed by length byte and the release sequence. A 4-byte
preamble with embedded command bit R = 0 consists of a 1-Wire command code followed by a status
byte and the release sequence. The long preamble (minimum 5 bytes, embedded command bit R = 0)
consists of a 1-Wire command, a length byte, data bytes and the release sequence. In this case the length
byte indicates the total number of bytes between the length byte and release sequence. The least
significant byte of the release sequence is transmitted first. Embedded command bit SPU must be 1 when
trying to run (start, continue) the CPU of the crypto iButton. In all other cases, SPU should be 0.
Additionally, embedded command bit F can be used to clear the communication command buffer and
EP2, 3 FIFOs if an error occurs during execution of the command. The EP2 FIFO must be pre-filled with
preamble data before command execution. Additionally, for preamble sizes greater then the FIFO size,
the FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO
when necessary.
A similar EP3 FIFO content monitoring requirement exists for the block read. During a block read the
number of bytes loaded into the EP3 FIFO must be monitored so that the data can be read before the
FIFO overflows. See the HW/SW APPLICATION RECOMMENDATION section for additional details.
1 byte specifying preamble size.
Command parameters:
EP2 data:
Length
Description
Same as
Preamble data to be written to the 1-Wire device.
preamble size
EP3 data:
Length
Description
If R=1 and preamble As specified in Data read from the 1-Wire device.
size ≥ 4: the second
byte of the
preamble
If R=0: None
No data is returned (this is a write application).
Result Register:
Code
Condition
CRC, CMP
ICP=0: bad CRC or the release sequence was not
accepted.
SET PATH - This command is used to activate a series of couplers that finally provide the access to the
target 1-Wire device. Embedded command bit RST enables a 1-Wire reset before the command executes.
Additionally, embedded command bit F can be used to clear the communication command buffer and
EP2,3 FIFOs if an error occurs during execution of the command. The EP2 FIFO must be pre-filled with
coupler data before command execution. Additionally, for coupler data sizes greater then the EP2 FIFO
size, the FIFO content status must be monitored by host SW so that additional data can be sent to the
FIFO when necessary. Upon completion of command execution, the EP3 FIFO is loaded with a 1-byte
value that indicates the number of couplers activated.
See the HW/SW APPLICATION
RECOMMENDATION section for additional details. An NRS error code is an indication that there was
no presence pulse on the branch that was to be connected.
24 of 50
033199
DS2490
Command parameters:
EP2 data:
EP3 data:
Result Register:
1 byte specifying number of couplers that need to be activated to set-up
the path to the target device.
Length
Description
9 bytes per
8 bytes ROM ID of the coupler to be activated
level
followed by the Smart-On command code for either
the main or auxiliary 1-Wire coupler output.
Length
Description
1 byte
Number of couplers successfully activated; should be
the same as the number of levels.
Code
Condition
CMP, SH,
ICP=0 and an error condition.
NRS
None
Otherwise.
WRITE SRAM PAGE - This command is used to write data to the scratchad of an SRAM device and
optionally check the CRC. To copy the data to its final memory location, it is required to send the READ
STRAIGHT command with a “copy scratchpad” preamble and a 0 block size. Embedded command bit
DT=1 activates the CRC16 generator. This command is also applicable to the Write IPR function of the
Crypto iButton if embedded command bit CIB=1. To write a partial page the page size parameter and the
target address need to be set accordingly. The EP2 FIFO must be pre-filled with preamble and SRAM
data before command execution. Additionally, for data page sizes greater then the EP2 FIFO size, the
FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO when
necessary. See the HW/SW APPLICATION RECOMMENDATION section for additional details.
1 byte specifying page size. This specifies the number of bytes to be
Command parameters:
sent to the 1-Wire device following a 2- or 3-byte preamble. This
number is typically identical to the page size; a value of 0x00 indicates
a 256-byte page.
EP2 data:
Length
Description
If CIB=0: 3-bytes + page Preamble and data bytes to be sent to the 1-Wire
size
SRAM device. 3-byte preamble: 1-Wire command
code, TA1, TA2 (typical).
If CIB=1: 2-bytes + page Preamble and data bytes to be sent to the 1-Wire
SRAM device. 2-byte preamble: 1-Wire command
size
code, length information.
None
EP3 data:
Result Register:
Code
Condition
CRC
ICP=0 and an error condition (only if DT=1).
None
Otherwise.
WRITE EPROM - This command is used to write data directly to the data or status memory of a 1-Wire
EPROM device. If embedded command bit DT=1, the CRC16 generator is selected; if DT=0, CRC8 is
used. Embedded command bit Z controls the method used for comparison of the data written to the 1Wire device. Additionally, embedded command bit F can be used to clear the Communication command
buffer and EP2, 3 FIFOs if an error occurs during execution of the command. The EP2 FIFO must be
pre-filled with preamble and EPROM data before command execution. Additionally, for data block sizes
greater then the EP2 FIFO size, the FIFO content status must be monitored by host SW so that additional
25 of 50
033199
DS2490
data can be sent to the FIFO when necessary. See the HW/SW APPLICATION RECOMMENDATION
section for additional details.
2 bytes specifying block size.
Command parameters:
EP2 data:
Length
3-bytes +
Preamble and data bytes to be sent to the 1-Wire
block size
EPROM device. 3-byte preamble: 1-Wire command
code, TA1, TA2 (typical).
None
EP3 data:
Result Register:
Code
Condition
CRC, CMP,
ICP=0 and an error condition.
VPP
READ CRC PROT PAGE - This command is used to read one or multiple CRC-protected pages of
EPROM devices and to read tamper-detect bytes and counter value of Monetary iButtons. If embedded
command bit DT=1, the CRC16 generator is selected; if DT=0, CRC8 is used. Embedded command bit
CIB is used to specify either a 2- or 3-byte read preamble. Additionally, embedded command bit F can
be used to clear the Communication command buffer and EP2, 3 FIFOs if an error occurs during
execution of the command. The command can also be used to read a single partial page up to the end of
that page and reading the PIOs of a DS2407. This command is also applicable to the Read IPR function
of the crypto iButton if CIB=1. The EP2 FIFO must be pre-filled with preamble data before command
execution. To prevent overflow, the EP3 FIFO must be monitored (and read if necessary) during
command execution if reading more data than the size of the EP3 FIFO. See the HW/SW
APPLICATION RECOMMENDATION section for additional details.
2 bytes: 1 byte page size, 1 byte number of pages. Page size byte
Command parameters:
indicates the number of bytes that are considered a page; typical is 32
decimal for data memory, 8 for status memory, and 40 decimal for
Monetary iButtons. A page size of 0x00 indicates a 256-byte page.
EP2 data:
Length
If CIB=0: 3-bytes
3-byte preamble: 1-Wire command code, TA1, TA2
(typical).
If CIB=1: 2-bytes
2-byte preamble: 1-Wire command code, length
information.
EP3 data:
Length
Description
(page size x
Data read from the 1-Wire device..
number of
pages)
Result Register:
Code
Condition
CRC
ICP=0 and an error condition.
READ REDIRECT PAGE W/CRC - This command is used to read a single page of data and check the
CRC. If the page is not redirected, the host will receive the page number and all its data. If the page is
redirected and embedded command bit CH=1 the device will follow the trail of redirections until a page is
found that is not redirected. When found, the host will receive the page number and all data of that
particular page. If CH = 0 and the first read attempt reveals a redirection the host will only receive the
number of the page the addressed page is redirected to. Reading starts at a page boundary. Additionally,
embedded command bit F can be used to clear the communication command buffer and EP2, 3 FIFOs if
an error occurs during execution of the command. An NRS error code is an indication of an infinite loop.
26 of 50
033199
DS2490
The EP2 FIFO must be pre-filled with ROM ID and command code data before command execution. To
prevent overflow, the EP3 FIFO must be monitored (and read if necessary) during command execution if
reading more data than the size of the EP3 FIFO.
See the HW/SW APPLICATION
RECOMMENDATION section for additional details.
2 bytes: 1 byte page size, 1 byte page address. Page size byte indicates
Command parameters:
the number of bytes that are considered a page; typical is 32 decimal for
data memory, 8 for status memory, and 40 decimal for Monetary
iButtons. A page size of 0x00 indicates a 256-byte page. The page
address specifies the page number to be used for the first read attempt.
EP2 data:
Length
9 bytes
8 bytes ROM ID of the 1-Wire device to be accessed
followed by the 1-Wire command code for “Extended
Read Memory”.
EP3 data:
Length
Description
If CH=1 or page is not 1 byte + page
Page number and contents of the page.
redirected: size
If CH=0 and page is 1 byte
Number of the page the addressed page is redirected
redirected:
to.
Result Register:
Code
Condition
RDP, CRC,
ICP=0 and an error condition.
NRS
SEARCH ACCESS - The SEARCH ACCESS command is used to either access a device using the
Search ROM command or to identify the devices on the active segments of a MicroLAN. Embedded
command bit SM is used to specify the type of search. Embedded command bit RTS is used to control
discrepancy information reporting. Additionally, embedded command bit F can be used to clear the
Communication command buffer and EP2, 3 FIFOs if an error occurs during execution of the command.
An NRS error code indicates that there was no response on at least one of the 64 bits of the ROM search.
The EP2 FIFO must be pre-filled with ROM ID data before command execution. To prevent overflow,
the EP3 FIFO must be monitored (and read if necessary) during command execution if returning more
data than the size of the EP3 FIFO. See the HW/SW APPLICATION RECOMMENDATION section for
additional details.
27 of 50
033199
DS2490
2 bytes: 1 byte 1-Wire command, 1 byte number of devices. The 1Wire command is a valid command for addressing a 1-Wire device.
The number of devices byte specifies the maximum number of devices
to be discovered in a single command call. A value of 0x00 indicates
that all devices on the MicroLAN are to be discovered.
EP2 data:
Length
8 bytes
ROM ID of the 1-Wire device to be accessed (SM=0)
or ROM ID with which to start the search (SM=1).
EP3 data:
Length
Description
If SM=0: None
No data is returned.
If SM=1: Varies, blocks ROM IDs of the devices discovered followed by 8
bytes discrepancy information (if RTS=1 and the
of 8 bytes.
numbers of devices on the MicroLAN is higher than
specified in the second parameter.
Result Register:
Code
Condition
EOS, NRS
ICP=0 and an error condition.
Command parameters:
28 of 50
033199
DS2490
DEVICE FEEDBACK
DS2490 state and result feedback are provided to the host over the EP1 interrupt pipe. The host interrupt
polling period for EP1 transfers is controlled by the alternate setting of the 1-Wire USB Interface as
described in the section: 1-Wire Interface Summary Description. As shown in Table 14, up to 32 bytes of
feedback data are returned. As a minimum, 16 bytes of STATE REGISTER data will be delivered at each
polling interval (or USB IN transaction to EP1); the position and definition of these data values are listed
in Table 15. In addition, as shown in Table 16, between 0 and 16 extra bytes of RESULT REGISTER
data will be delivered which could contain communication command error data or a 1-Wire device detect
byte. If there are less than 32 bytes of result and state register data to return, the DS2490 will terminate
the IN transaction with a short or zero data packet.
Data is loaded into the RESULT REGISTER buffer if a communication command error occurs or upon
detection of a 1-Wire device attachment. There is no defined offset position for data values in this buffer.
Knowledge of communication command ordering sent to the DS2490 must be maintained on the host to
properly interpret the returned data values. In addition, a parse of the data is required to determine
whether or not a 1-Wire detect value is included; the value of the 1-Wire detect byte is unique. Table 17
defines the 1-Wire detect byte and data values that result from Communication command processing.
Interrupt Transfer Data Summary Table 14
OFFSET
0x00 - 0x0F
0x10 – 0x1F*
DATA
STATE REGISTERS
RESULT REGISTERS
*The
number of RESULT RESIGTER values will vary depending on error conditions encountered while
processing Communication commands or whether a 1-Wire device was detected.
29 of 50
033199
DS2490
DS2490 STATE REGISTERS Table 15
Description
Enable Flags
Offset
0x00
1-Wire Speed
Strong Pullup Duration
Programming Pulse
Duration
Pulldown Slew Rate
Control
Write-1 Low Time
Data Sample Offset /
Write-0 Recovery Time
Reserved (Test Register)
Device Status Flags
0x01
0x02
0x03
Data
bit7 bit6 bit5 bit4
bit3
bit2
bit1
bit0
-----SPCE
PRGE
SPUE
SPUE If set to 1 the strong pullup to 5V is enabled, if set to 0 it
is disabled.
PRGE If set to 1 a 12V programming pulse is enabled, if set to 0
it is disabled.
SPCE If set to 1 a dynamic 1-Wire bus speed change through a
Communication command is enabled, if set to 0 it is
disabled.
bit 3..7 These bits are reserved.
current 1-Wire bus speed code
current pullup duration
current programming pulse duration
0x04
current pulldown slew rate code
0x05
0x06
current Write-1 low time code
current data sample offset/ Write-0 recovery time code
Communication
Command, Byte 1
Communication
Command, Byte 2
0x09
0x07
0x08
0x0A
bit7 bit6 bit5
bit4
bit3
bit2
bit1
bit0
--IDLE HALT PMOD 12VP PRGA SPUA
Bit Definitions:
SPUA if set to 1 the strong pullup to 5V is currently active, if
set to 0 it is inactive.
PRGA if set to 1 a 12V programming pulse is currently being
generated, if set to 0 it is not.
12VP if set to 1 the external 12V programming voltage is
present, if set to 0 it is not present.
PMOD if set to 1 the DS2490 is powered from USB and external
sources, if set to 0 all DS2490 power is provided from
USB.
HALT if set to 1 the DS2490 is currently halted, if set to 0 the
device is not halted.
IDLE if set to 1 the DS2490 is currently idle, if set to 0 the
device is not idle.
bit 6..7: reserved
Communication command currently being processed. If the device
is idle a register value of 0x00 is sent.
Communication command currently being processed. If the device
is idle a register value of 0x00 is sent.
30 of 50
033199
DS2490
Description
Communication
Command Buffer Status
1-Wire Data Out Buffer
Status
1-Wire Data In Buffer
Status
Reserved (Test Register)
Reserved (Test Register)
Offset
0x0B
0x0C
0x0D
0x0E
0x0F
Data
Number of data bytes currently contained in the 16-byte FIFO used
to hold communication commands.
Number of data bytes currently contained in the 128-byte FIFO
used to write data to the 1-Wire bus.
Number of data bytes currently contained in the 128-byte command
FIFO used to read data from the 1-Wire bus.
reserved
reserved
DS2490 RESULT REGISTERS Table 16
Offset1,2
0x10
0x11
…
0x1F
Data
value
value
…
value
Notes:
1. Since Result Registers follow State Registers for interrupt transfers, the register offset starting value
shown in Table 16 for Result Registers follows the last value of Table 15 State Registers.
2. The number of Result Register bytes returned will vary depending on the number of communication
command error conditions encountered or whether an iButton device was attached/detected.
31 of 50
033199
DS2490
DS2490 RESULT REGISTER VALUE DEFINITION Table 17
Data Value Description
1-Wire Device Detect Byte
Communication Command Error
Result
bit7
bit6
bit5
bit4
Data
0xA5
bit3
EOS
RDP
CRC
CMP
VPP
bit2
bit1
bit0
APP
SH
NRS
Bit Definitions:
EOS A value of 1 indicates that a SEARCH ACCESS with
SM=1 ended sooner than expected reporting less ROM
Ids than specified in the “number of devices” parameter.
RDP A value of 1 indicates that a READ REDIRECT PAGE
WITH/CRC encountered a page that is redirected.
CRC A value of 1 indicates that a CRC error occurred when
executing one of the following commands: WRITE
SRAM PAGE, WRITE EPROM, READ CRC PROT
PAGE, or READ REDIRECT PAGE W/CRC.
CMP A value of 1 indicates that there was an error when
reading the confirmation byte with a SET PATH
command or that the WRITE EPROM command did not
program successfully.
VPP A value of 1 indicates that during a PULSE with
TYPE=1 or WRITE EPROM command the 12V
programming pulse was not seen on the 1-Wire bus; this
could indicate that there were other devices on the bus
that clamped the voltage to a value lower than VPP or
that the programming pulse was disabled with a mode
command.
APP A value of 1 indicates that a 1-WIRE RESET revealed an
Alarming Presence Pulse.
SH A value of 1 indicates that a 1-WIRE RESET revealed a
short to the 1-Wire bus or the SET PATH command
could not successfully connect a branch due to a short.
NRS A value of 1 indicates that a 1-WIRE RESET did not
reveal a Presence Pulse or the SET PATH command did
not get a Presence Pulse from the branch that was to be
connected.
A value of 0 in any of these fields indicates that the error
condition was not detected.
USB TRANSCEIVER
Integrated within the DS2490 is a USB-compliant bus transceiver. To comply with USB cable
termination requirements, resistors external to the DS2490 must be installed as shown in Figure 11. The
24-ohm, 1% tolerance resistors are necessary to bring the total steady state resistance of each driver to the
28-43 ohm range required by the USB core specification. The 1.5 kohm pullup resistor is required to
32 of 50
033199
DS2490
identify the DS2490 as a high speed USB device to the up-stream HUB. The 33 pF capacitors are
optional but are useful for edge rate control and for bypassing high frequency energy to ground for EMI
reduction purposes.
USB Transceiver Termination Figure 11
VB
(VB = 3.3V + 10%)
1.5kΩ
5%
DS2490
24Ω, 1%
TO/FROM
HIGH SPEED
USB CABLE
D+
24Ω, 1%
D33pF
USB
TRANSCEIVER
33pF
SUSPEND OUTPUT
Suspend output signal ( SUSO ) operation is a function of both the USB device state of the DS2490
(configured or unconfigured) and the USB suspend state. A truth table for signal operation is listed in
Table 18. This signal could be used stand-alone or combined with other external signals to power down
circuitry external to the DS2490, such as power sources. The SUSO signal is an open drain output and
requires an external pullup to a positive supply no greater than 6.0V.
Suspend Output Operation Table 18
Device State
unconfigured
configured
configured
Suspend State
don’t care
not suspended
suspended
SUSO
high
low
high
OSCILLATOR
The DS2490 requires a single 12.0 MHz crystal or crystal oscillator clock source to operate. Crystals or
CMOS crystal oscillators may be used to provide clock sources. For crystals, use parallel resonant,
fundamental mode with a CL specification between 10 pF and 20 pF at the required frequency. Parallel
loading capacitors with a value of approximately twice CL are also required. The connection scheme
shown in Figure 12 should be used. For external CMOS crystal oscillators, make a connection directly to
the DS2490 XI input. The XO output must be left floating for this arrangement.
Oscillator Connection Figure 12
33 pF
XI
12 MhZ
DS2490
XO
33 pF
33 of 50
033199
DS2490
ABSOLUTE MAXIMUM RATINGS*
Voltage on Any Pin Relative to Ground
Operating Temperature
Storage Temperature
Soldering Temperature
-0.5V to +7.0V
0 oC to +70 oC
-55 oC to +125 oC
260 oC for 10 seconds
• This is a stress rating only and functional operation of the device at these or any other conditions above
those indicated in the operation sections of this specification is not implied. Exposure to absolute
maximum rating conditions for extended periods of time may affect reliability.
RECOMMENDED DC OPERATING CONDITIONS
PARAMETER
USB I/F Supply Voltage
Digital Supply Voltage
EPROM Programming
Supply Voltage
(programming supported)
EPROM Programming
Supply Voltage
(programming not supported)
Input Logic 0
Input Logic 1
Operating Temperature
SYMBOL
VB
VD
VPP
MIN
3.0
4.4
11.75
TYP
3.3
5.0
12.0
MAX
3.6
5.5
12.25
UNITS
V
V
V
NOTES
1, 3
1, 3
1, 3
VPP
4.4
5.0
5.5
V
1, 2, 3
VIL
VIH
TA
-0.3
2.8
0
V
V
o
C
1
1
25
0.3
VD + 0.3
70
NOTES:
1. Voltage referenced to ground.
2. When EPROM programming is not supported VPP must be tied to VD.
3. During device power-up, the supply application sequence order must be VD, VPP, VB.
DC ELECTRICAL CHARACTERISTICS
PARAMETER
VD Operating Current
VB Operating Current
Idle Current on VPP
Active Pullup Timer
Threshold
Active Pullup On Threshold
1-Wire Input High
1-Wire Input Low
1-Wire Weak Pullup Current
1-Wire Active Pullup current
Strong Pullup Voltage Drop
SYMBOL
ID
IB
IPP
VIAPTO
VIAPO
VIH1
VIL1
IWEAKPU
IACTPU
∆VSTRPU
TA: 0 oC - 70 oC
VD: 4.4V - 5.5V, VB:3.0V - 3.6V
MIN
TYP
VD-1.4
20
VD-1.1
0.95
MAX
tbd
tbd
UNITS
mA
mA
µA
V
1.2
V
V
V
mA
mA
V
3.4
1.8
9
3.0
15
1.8
5.0
0.5
34 of 50
NOTES
4
4
1
2
033199
DS2490
PARAMETER
@ 50 mA load on 1-Wire
Programming Voltage Drop
@ 10 mA load on 1-Wire
Power On Reset Trip Point
VPP Sensor Trip Point
SYMBOL
MIN
TYP
MAX
UNITS
NOTES
∆VPROG
0.24
V
3
VPOR
VPPTRIP
3.3
V
V
9.08
NOTES:
1. Applies only if 12.0V VPP supply is connected. If VPP and VD are tied together, current is less than
1 µA.
2. Voltage difference between VD and 1-WIRE.
3. Voltage difference between VPP and 1-WIRE.
4. The sum of ID and IB will not exceed 50 mA.
AC CHARACTERISTICS CONDITIONS:
PARAMETER
USB I/F
1-Wire I/F
TA: 0 oC - 70 oC
VD: 4.4V - 5.5V, VB: 3.0V - 3.6V
SPECIFICATION
As defined in Chapter 7 of the USB Specification
See the section “1-WIRE INTERFACE CONTROLLER” of this
document
TA:25 oC
CAPACITANCE CONDITIONS:
PARAMETER
Input Capacitance
Output Capacitance
Input/Output Capacitance
SYMBOL
CIN
COUT
CIO
MIN
TYP
MAX
15
15
15
UNITS
pF
pF
pF
NOTES
HW/SW APPLICATION RECOMMENDATIONS
A schematic example of a USB to 1-Wire Adapter peripheral is shown in Figure 13.
Software application recommendations – TBA.
When using the DS2490 to communicate with the Crypto-1-Wire or devices which require large data
transfers, it is suggested that the FIFO for Endpoint 2 (128 bytes) be filled with data before starting the
Communication command which will be responsible for the transmission to the 1-Wire bus. Once the
command is started and if more data than the initial 128 bytes is to be sent, the Endpoint 2 FIFO status
must be monitored via EP1 state registers. Additional data must not be sent until there is less than 64
bytes remaining in the Endpoint 2 FIFO. Operating in this fashion will keep the 1-Wire bus from
becoming idle during large data transfers to the 1-Wire device as well as minimizing the USB bandwidth
consumed by the DS2490.
35 of 50
033199
DS2490
HW DESIGN EXAMPLE: USB TO 1-WIRE ADAPTER Figure 13
L1
J1
VBUS
DD+
1
3
U1
LT1121CST-3.3 (or equivalent)
3
IN
OUT
4
C1
R2
5
L2
USB
GND
SHIELD
EMI Filter
2
GND
GND
1
0.1
1.5K
C2
1.0
U2
C3
2
TAB
1
0.1
2
3
EMI Filter
R3
24, 1%
4
5
6
7
R4
24, 1%
8
C6
33pF
C7
33pF
PMOD
VD
NC
NC
VB
XI
SUSO
XO
D-
NC
D+
VPP
GND
NC
NC
1-WIRE
16
C4
33pF
15
14
13
12
X1
11
12.0 MHz
10
9
C5
33pF
DS2490
D1
BAT54S
Notes:
C8
1. Resistors are 1/8W, 5% unless noted.
2. Capacitor values are in microfarads unless noted.
3. Capacitor voltage ratings are 10V minimum.
4. Crystal is a Seiko-Epson MA-505-12.00M-C2 or equivalent.
J2
5. EMI filters L1 and L2 are Murata BLM21P221SG or equivalent.
1
2
3
4
5
6
D2
RJ-11
DS9502
36 of 50
033199
DS2490
APPENDIX 1: DS2490 CONTROL COMMANDS, SETUP PACKET ENCODING
CONTROL COMMANDS
RESET DEVICE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
CONTROL_CMD
CTL_RESET_DEVICE
0x0000
0x0000
START EXECUTION
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
CONTROL_CMD
CTL_START_EXE
0x0000
0x0000
RESUME EXECUTION
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
CONTROL_CMD
CTL_RESUME_EXE
0x0000
0x0000
HALT EXECUTION WHEN
IDLE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
CONTROL_CMD
CTL_HALT_EXE_IDLE
0x0000
0x0000
HALT EXECUTION WHEN
DONE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
0x40
CONTROL_CMD
CTL_HALT_EXE_DONE
0x0000
37 of 50
033199
DS2490
CONTROL COMMANDS
wLength
0x0000
CANCEL COMMAND
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
CONTROL_CMD
CTL_CANCEL_CMD
0x0000
0x0000
CANCEL MACRO
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
CONTROL_CMD
CTL_CANCEL_MACRO
0x0000
0x0000
FLUSH COMM CMDS
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
FLUSH DATA RCV
BUFFER
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
FLUSH DATA XMT
BUFFER
Setup Packet Encoding:
bmRequestType
bRequest
wValue
The DS2490 must be in a halted state before the FLUSH COMM
CMDS command can be processed.
0x40
CONTROL_CMD
CTL_FLUSH_COMM_CMDS
0x0000
0x0000
The DS2490 must be in a halted state before the FLUSH DATA
RCV BUFFER command can be processed.
0x40
CONTROL_CMD
CTL_FLUSH_RCV_BUFFER
0x0000
0x0000
The DS2490 must be in a halted state before the FLUSH DATA
XMT BUFFER command can be processed.
0x40
CONTROL_CMD
CTL_FLUSH_XMT_BUFFER
38 of 50
033199
DS2490
CONTROL COMMANDS
wIndex
wLength
GET COMM CMDS
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x0000
0x0000
The DS2490 must be in a halted state before the GET COMM
CMDS command can be processed.
0xC0
CONTROL_CMD
CTL_GET_COMM_CMDS
0x0000
variable
The value of the wLength field depends on the number of
communication commands and parameters loaded in the FIFO.
39 of 50
033199
DS2490
APPENDIX 2: DS2490 COMMUNICATION COMMANDS, EMBEDDED COMMAND BITS, SETUP
PACKET ENCODING.
Communication commands contain embedded command parameter bits in the wValue field. The
definitions of bit parameters are described below.
BIT NAME DESCRIPTION
CH
CH=1 follows the chain if the page is redirected.
CH=0 stops reading if the page is redirected.
CIB
CIB=1 prevents a strong pullup to 5V if SPU=1 and the bit read back from the 1-Wire
bus is 1.
CIB=0 generally enables the strong pullup to 5V.
PS
PS=1 reduces the preamble size to 2 bytes (rather than 3).
PS=0 sets preamble size to 3 bytes.
D
Data bit value to be written to the 1-Wire bus.
DT
DT=1 activates/selects the CRC16 generator
DT=0 specifies no CRC.
F=1 clears the buffers in case an error occurred during the execution of the previous
F
command; requires that ICP=0 in the previous command.
F=0 prevents the buffers from being cleared.
ICP
ICP=1 indicates that the command is not the last one of a macro; as a consequence error
feedback messages are suppressed.
ICP=0 indicates that the command is the last one of a macro or single command
operation; enables error feedback signaling.
IM
IM=1 enables immediate execution of the command. Assumes that all 1-Wire device
data required by the command has been received at EP2.
IM=0 prevents immediate execution of the command; execution must be started through
a control function command.
PST
PST=1 continuously generate 1-Wire Reset sequences until a presence pulse is
discovered.
PST=0 generate only one 1-Wire Reset sequence.
R
R=1 performs a read function.
R=0 performs a write function.
RST
RST=1 inserts a 1-Wire Reset before executing the command.
RST=0 no 1-Wire Reset inserted.
RTS
RTS=1 returns the discrepancy information to the host if SM=1 and there are more
devices than could be discovered in the current pass.
RTS=0 does not return discrepancy information.
SE
SE=1 enable the speed change on the 1-Wire bus.
SE=0 disable the speed change on the 1-Wire bus.
SM
SM=1 searches for and reports ROM Ids without really accessing a particular device.
SM=0 makes a “Strong Access” to a particular device.
SPU=1 inserts a strong pullup to 5V after a Bit or Byte or Block I/O or Do & Release
SPU
command.
SPU=0 no strong pullup.
40 of 50
033199
DS2490
TYPE
Z
TYPE=1 specifies programming pulse duration.
TYPE=0 specifies strong pullup duration.
Z=1 checks if the 0-bits in the byte to be written are 0-bits in the byte read back form
the device.
Z=0 checks if the byte to be written is identical to the one read back from the device.
COMMUNICATION COMMANDS
If an error condition was detected, host intervention is required to
recover from the ERROR ESCAPE state. If no error occurred, the
ERROR ESCAPE
command is processed as a NO OPERATION.
Setup Packet Encoding:
bmRequestType
0x40
bRequest
COMM_CMD
wValue
byte 2
byte 1
byte 2:
0
0
0
0
F
1
1
RST
byte 1:
0
0
0
0
0
0
0
1
wIndex
0x0000
wLength
0x0000
SET DURATION
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
PULSE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
COMM_CMD
byte 2
byte 2:
0
0
0
byte 1:
0
0
0
byte 2
byte 2 – 0x00 (unused)
byte 1 – new duration:
Unsigned 8-bit binary number
MODE CONTROL section for
format information.
0x0000
0x40
COMM_CMD
byte 2
byte 2:
0
0
byte 1:
0
0
0x0000
0x0000
41 of 50
0
1
0
1
0
TYPE
byte 1
0
ICP
0
1
byte 1
0
IM
specifying the new duration. See
byte bit weighting and additional
0
1
F
TYPE
byte 1
0
ICP
0
0
0
IM
033199
DS2490
COMMUNICATION COMMANDS
1-WIRE RESET
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
BIT I/O
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
BYTE I/O
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
PST
0
0
F
0
ICP
byte 1:
0
1
0
0
SE
0
1
byte 2
byte 1
byte 2 – 0x00 (unused)
byte 1 – new speed:
0x02
with SE=1 after Overdrive Skip ROM
0x01 or 0x00 with SE=1 in all other cases
don’t care
with SE=0
0x0000
0x40
COMM_CMD
byte 2
byte 2:
0
CIB
byte 1:
0
0
0
1
SPU
0
0
D
byte 1
0
ICP
0
0
0
IM
0
IM
0x0000
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
0
0
SPU
0
0
ICP
0
byte 1:
0
1
0
1
0
0
1
IM
byte 2
byte 1
byte 2 – 0x00 (unused)
byte 1 – data byte to be sent to the 1-Wire bus. To read only, the
byte should be 0xFF.
0x0000
BLOCK I/O
Setup Packet Encoding:
42 of 50
033199
DS2490
COMMUNICATION COMMANDS
bmRequestType
0x40
bRequest
COMM_CMD
wValue
byte 2
byte 2:
0
0
0
SPU
0
byte 1:
0
1
1
1
0
wIndex
byte 2
byte 2 – block size (HI), most significant byte
byte 1 – block size (LOW), least significant byte
wLength
0x0000
MATCH ACCESS
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
READ STRAIGHT
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
byte 1
0
ICP
1
0
byte 1
RST
IM
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
0
0
0
0
0
ICP RST
byte 1:
0
1
1
0
SE
1
0
IM
byte 2
byte 1
byte 2 – new speed:
0x02
with SE=1 after Overdrive Skip ROM
0x01 or 0x00 with SE=1 in all other cases
don’t care
with SE=0
byte 1 – 1-Wire command:
Command to be used for addressing a 1-Wire device. Valid codes:
0x55 (Match ROM)
0x69 (Overdrive Match ROM)
0x0000
0x40
COMM_CMD
byte 2
byte 1
byte 2: Preamble size. Number of bytes to be written.
byte 1:
1
0
0
0
0
ICP RST
IM
byte 2
byte 1
byte 2 – Block size HI. Number of bytes to be read, most significant
byte.
byte 1 - Block size LOW. Number of bytes to be read, least
significant byte.
byte 2
byte 1
byte 2 – 0x00 (not used)
43 of 50
033199
DS2490
COMMUNICATION COMMANDS
byte 1 – Preamble size. Number of bytes to be written.
DO & RELEASE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
SET PATH
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
WRITE SRAM PAGE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
1
1
SPU
F
0
ICP
byte 1:
1
0
0
1
R
0
1
byte 2
byte 1
byte 2 – 0X00 (unused)
byte 1 – size in bytes of preamble to be written.
0x0000
0
IM
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
0
0
0
F
0
ICP RST
byte 1:
1
0
1
0
0
0
1
IM
byte 2
byte 1
byte 2 – 0X00 (unused)
byte 1 – size in bytes of number of couplers that need to be activated
to set up the path to the target device.
0x0000
DT=1 activates the CRC16 generator. This command is also
applicable to the Write IPR and Write I/O Buffer function of the
crypto iButton if CIB=1. To write a partial page the page size
parameter and the target address need to be set accordingly.
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
PS
DT
0
F
0
ICP
0
byte 1:
1
0
1
1
0
0
1
IM
byte 2
byte 1
byte 2 – 0X00 (unused)
byte 1 – number of bytes to be sent to the device following a 3 byte
preamble. This number is typically identical to the page size. A value
of 0x00 stands for a 256 byte page.
44 of 50
033199
DS2490
COMMUNICATION COMMANDS
wLength
0x0000
DT=1 selects the CRC16 generator. Otherwise an 8-bit CRC is
assumed. If Z=1 the comparison of the byte read back for verification
is limited to 0 bits only.
WRITE EPROM
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
READ CRC PROT PAGE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
READ REDIRECT PAGE
W/CRC
Setup Packet Encoding:
bmRequestType
bRequest
wValue
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
0
DT
0
F
0
ICP
0
byte 1:
1
1
0
0
Z
1
0
IM
byte 2
byte 1
byte 2 – block size (HI), number of bytes to be written, most
significant byte
byte 1 – block size (LOW), number of bytes to be written, least
significant byte
0x0000
DT=1 selects the CRC16 generator, otherwise an 8-bit CRC is
assumed. This command is also applicable to the Read IPR and Read
I/O Buffer function of the crypto iButton if CIB=1.
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
PS
DT
0
F
0
ICP
0
byte 1:
1
1
0
1
0
1
0
IM
byte 2
byte 1
byte 2 –number of pages to be read.
byte 1 – page size: number of bytes that are considered a page.
Typical is 32-decimal for data memory, 8 for status memory, and 40
decimal for Monetary iButtons. Page size 0 indicates a 256-byte
page.
0x0000
0x40
COMM_CMD
byte 2
byte 2:
0
0
45 of 50
1
0
F
byte 1
0
ICP
1
033199
DS2490
COMMUNICATION COMMANDS
byte 1:
1
1
1
0
CH
1
0
IM
wIndex
byte 2
byte 1
byte 2 - page number to be used for the first read attempt.
byte 1 – page size: number of bytes that are considered a page.
Typical is 32 decimal for data memory. Page size 0 indicates a 256byte page.
wlength
0x0000
SEARCH ACCESS
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
COMM_CMD
byte 2
byte 1
byte 2:
0
RTS
0
0
F
0
ICP RST
byte 1:
1
1
1
1
SM
1
0
IM
byte 2
byte 1
byte 2 – number of devices. Maximum number of devices to be
discovered in a single command call. A value of 0x00 indicates that
all devices on the MicroLAN are to be discovered.
byte 1 – 1-Wire command:
Command to be used for addressing a 1-Wire device. Valid codes:
0xF0 (Search ROM)
0xEC (Conditional Search ROM)
0x0000
46 of 50
033199
DS2490
APPENDIX 3: DS2490 MODE COMMANDS, SETUP PACKET ENCODING
MODE COMMANDS
ENABLE PULSE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
ENABLE SPEED CHANGE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
1-WIRE SPEED
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x40
MODE_CMD
MOD_PULSE_EN
byte 2
byte 1
byte 2 – 0x00
byte
SPU
0
0
0
0
0
0
PRGE
1:
E
Strong pullup is enabled with SPUE=1, disabled with SPUE=0.
+12V Programming pulse is enabled with PRGE=1, disabled with
PRGE=0.
0x0000
0x40
MODE_CMD
MOD_SPEED_CHANGE_EN
byte 2
byte 1
byte 2 – 0x00
byte 1 – Boolean value. Speed changes are enabled with TRUE,
disabled with FALSE.
0x0000
0x40
MODE_CMD
MOD_1WIRE_SPEED
byte 2
byte 1
byte 2 – 0x00
byte 1 – 1-Wire speed:
Code specifying communication speed of the 1-Wire bus.
MODE CONTROL section for code definition.
0x0000
See
STRONG PULLUP
DURATION
Setup Packet Encoding:
47 of 50
033199
DS2490
MODE COMMANDS
bmRequestType
bRequest
wValue
wIndex
wLength
PULLDOWN SLEW RATE
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
PROG PULSE DURATION
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
WRITE-1 LOW TIME
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
0x40
MODE_CMD
MOD_STRONG_PU_DURATION
byte 2
byte 1
byte 2 – 0x00
byte 1 – Unsigned 8-bit binary number specifying the pullup
duration. See MODE CONTROL section for byte bit weighting and
additional format information.
0x0000
0x40
MODE_CMD
MOD_PULLDOWN_SLEWRATE
byte 2
byte 1
byte 2 – 0x00
byte 1 – Code specifying the typical pulldown slew rate. See MODE
CONTROL section for code definition.
0x0000
0x40
MODE_CMD
MOD_PROG_PULSE_DURATION
byte 2
byte 1
byte 2 – 0x00
byte 1 – Unsigned 8-bit binary number specifying the EPROM
programming pulse duration. See MODE CONTROL section for
byte bit weighting and additional format information.
0x0000
0x40
MODE_CMD
MOD_WRITE1_LOWTIME
byte 2
byte 1
byte 2 – 0x00
byte 1 – Code specifying the Write-1 low time duration. See MODE
CONTROL section for code definition.
48 of 50
033199
DS2490
MODE COMMANDS
wLength
DSOW0 RECOVERY TIME
Setup Packet Encoding:
bmRequestType
bRequest
wValue
wIndex
wLength
0x0000
0x40
MODE_CMD
MOD_DSOW0_TREC
byte 2
byte 1
byte 2 – 0x00
byte 1 – Code specifying the recovery time for data sample offset and
Write-0. See MODE CONTROL section for code definition.
0x0000
49 of 50
033199
DS2490
APPENDIX 4: COMMAND, COMMAND TYPE CONSTANT CODES
COMMAND TYPE CODES
Name
CONTROL_CMD
COMM_CMD
MODE_CMD
TEST_CMD
bRequest
0x00
0x01
0x02
0x03
CONTROL COMMAND CODES
Name
CTL_RESET_DEVICE
CTL_START_EXE
CTL_RESUME_EXE
CTL_HALT_EXE_IDLE
CTL_HALT_EXE_DONE
CTL_CANCEL_CMD
CTL_CANCEL_MACRO
CTL_FLUSH_COMM_CMDS
CTL_FLUSH_RCV_BUFFER
CTL_FLUSH_XMT_BUFFER
CTL_GET_COMM_CMDS
wValue
0x0000
0x0001
0x0002
0x0003
0x0004
0x0005
0x0006
0x0007
0x0008
0x0009
0x000A
MODE COMMAND CODES
Name
MOD_ PULSE_EN
MOD_SPEED_CHANGE_EN
MOD_1WIRE_SPEED
MOD_STRONG_PU_DURATION
MOD_PULLDOWN_SLEWRATE
MOD_PROG_PULSE_DURATION
MOD_WRITE1_LOWTIME
MOD_DSOW0_TREC
wValue
0x0000
0x0001
0x0002
0x0003
0x0004
0x0005
0x0006
0x0007
50 of 50
033199
Similar pages