0% found this document useful (0 votes)
44 views26 pages

Not Recommended For New Design: 4kbit 1-Wire RAM With Counter

Uploaded by

Farias
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views26 pages

Not Recommended For New Design: 4kbit 1-Wire RAM With Counter

Uploaded by

Farias
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

EVALUATION KIT AVAILABLE

LE
AVAILAB

DS2423
4kbit 1-Wire
RAM with Counter

gn
FEATURES
ƒ 4096 bits of SRAM ƒ Compact, low cost 6-pin TSOC surface mount

i
ƒ Four 32-bit, read-only counters package

es
ƒ Active-low external trigger inputs for two of ƒ Reads, writes and counts over a wide voltage
the counters with on-chip debouncing range of 2.8V to 5.5V from -40°C to +85°C

D
compatible with reed and Wiegand switches
ƒ Unique, factory-lasered and tested 64-bit PIN ASSIGNMENT

ew
registration number (8-bit family code + 48- TSOC PACKAGE
bit serial number + 8-bit CRC tester) assures
1 6
absolute traceability because no two parts are 2 5
alike

rN
3 4
ƒ Memory partitioned into 16 256-bit pages in
TOP VIEW
for packetizing data 3.7mm x 4.0mm x 1.5mm
ƒ 256-bit scratchpad with strict read/write fo
protocols ensures integrity of data transfer
ƒ On-chip 16-bit CRC generator for SIDE VIEW
safeguarding data transfers
d

PIN DESCRIPTION
ƒ Built-in multidrop controller ensures
de

Pin 1 Ground
compatibility with other MicroLAN products
Pin 2 Data
ƒ Directly connects to a single port pin of a
Pin 3 Vbat
microprocessor and communicates at up to
en

Pin 4 NC
16.3kbits per second
Pin 5 Input channel B
ƒ Overdrive mode boosts communication speed
Functional Diagrams Pin 6 Input channel A
m

to 142kbits per second


ƒ 8-bit family code specifies device
ORDERING INFORMATION
om

communication requirements to reader


ƒ Presence detector acknowledges when reader DS2423P 6-pin TSOC package
first applies voltage DS2423P/T&R Tape & Reel Version of
DS2423P
ec

DS2423P+ 6-pin TSOC package


+ Indicates lead-free compliance.
R

DESCRIPTION
The DS2423 1-Wire® RAM with Counters is a fully static, read/write memory for battery operation in a
ot

low-cost, six-lead TSOC, surface-mount package. The memory is organized as 16 pages of 256 bits each.
In addition, the device has four counters, two of them with external trigger inputs called A and B. Each of
N

the counters is associated with a memory page. A counter without external trigger input increments each
time data is written to the page it is associated with (write cycle counter). The counters triggered by
inputs A and B, respectively,
Pin Configurations increment
appear at end of data sheet. with every low-going pulse on their input. All counters are read-
Functional Diagrams continued at end of data sheet.
only. They are automatically cleared to 0 when the battery is connected.
UCSP is a trademark of Maxim Integrated Products, Inc.

1-Wire is a registered trademark of Dallas Semiconductor Corp., a


wholly owned subsidiary of Maxim Integrated Products Inc.
1 of 25
For pricing, delivery, and ordering information, please contact Maxim Direct
at 1-888-629-4642, or visit Maxim’s website at www.maximintegrated.com. 080207
DS2423
The battery-backed memory offers a simple solution to storing and retrieving information pertaining to
the equipment where the DS2423 is installed and its frequency of use. The scratchpad is an additional
page that acts as a buffer when writing to memory. Data is first written to the scratchpad where it may be
read back for verification. A copy scratchpad command will then transfer the data to memory. This
process ensures data integrity when modifying the memory. A 64-bit registration number is factory
lasered into each DS2423 to provide a guaranteed unique identity which allows for absolute traceability
and acts as node address if multiple DS2423 are connected in parallel to form a local network. Data is

gn
transferred serially via the 1-Wire protocol, which requires only a single data lead and a ground return.

The DS2423 1-Wire RAM with Counters can store encrypted data. The unique registration number and

i
the page write cycle counter(s) prevent unauthorized manipulation of data stored in a page with a write

es
cycle counter associated.

D
OVERVIEW
The block diagram in Figure 1 shows the relationships between the major control and memory sections of

ew
the DS2423. The DS2423 has four main data components: 1) 64-bit lasered ROM, 2) 256-bit scratchpad,
3) 4096-bit SRAM, and 4) four 32-bit read-only counters. The hierarchical structure of the 1-Wire
protocol is shown in Figure 2. Each of these counters is associated with one of the 256-bit memory pages.

rN
The four counters of the DS2423 are associated with pages 12 to 15. The contents of the counter are read
together with the memory data using a special command. The bus master must first provide one of the
six ROM Function Commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, 4) Skip ROM, 5)
Overdrive-Skip ROM or 6) Overdrive-Match ROM. Upon completion of an Overdrive ROM command
fo
byte executed at standard speed, the device will enter Overdrive mode where all subsequent
communication occurs at a higher speed. The protocol required for these ROM function commands is
d

described in Figure 9. After a ROM function command is successfully executed, the memory functions
become accessible and the master may provide any one of the five memory function commands. The
de

protocol for these memory function commands is described in Figure 7. All data is read and written least
significant bit first.
en

PARASITE POWER
The block diagram (Figure 1) shows the parasite-powered circuitry. This circuitry steals power whenever
m

the I/O input is high. I/O will provide sufficient power as long as the specified timing and voltage
requirements are met. The advantages of parasite power are two-fold: 1) by parasiting off this input,
om

lithium is conserved, and 2) if the battery is exhausted for any reason, the ROM may still be read
normally.
ec

64-BIT LASERED ROM


Each DS2423 contains a unique ROM code that is 64 bits long. The first 8 bits are a 1-Wire family code.
The next 48 bits are a unique serial number. The last 8 bits are a CRC of the first 56 bits (See Figure 3).
R

The 1-Wire CRC is generated using a polynomial generator consisting of a shift register and XOR gates
as shown in Figure 4. The polynomial is X8 + X5 + X4 + 1. Additional information about the Dallas 1-
ot

Wire Cyclic Redundancy Check is available in Application Note 27. The shift register bits are initialized
to 0. Then starting with the least significant bit of the family code, one bit at a time is shifted in. After the
N

8th bit of the family code has been entered, then the serial number is entered. After the 48th bit of the
serial number has been entered, the shift register contains the CRC value. Shifting in the 8 bits of CRC
should return the shift register to all 0s.

2 of 25
DS2423
BLOCK DIAGRAM Figure 1

i gn
es
D
ew
rN
fo
d

ADDRESS REGISTERS AND TRANSFER STATUS


Because of the serial data transfer, the DS2423 employs three address registers called TA1, TA2, and E/S
de

(Figure 6). Registers TA1 and TA2 must be loaded with the target address to which the data will be
written or from which data will be sent to the master upon a Read command. Register E/S acts like a byte
en

counter and Transfer Status register. It is used to verify data integrity with write commands. Therefore,
the master only has read access to this register. The lower 5 bits of the E/S register indicate the address of
the last byte that has been written to the scratchpad. This address is called Ending Offset. Bit 5 of the E/S
m

register, called PF or “partial byte flag,” is set if the number of data bits sent by the master is not an
integer multiple of 8. Bit 6 has no function; it always reads 0. Note that the lowest 5 bits of the target
om

address also determine the address within the scratchpad, where intermediate storage of data will begin.
This address is called byte offset. If the target address (TA1) for a Write command is 03CH for example,
then the scratchpad will store incoming data beginning at the byte offset 1CH and will be full after only 4
ec

bytes. The corresponding ending offset in this example is 1FH. For best economy of speed and efficiency,
the target address for writing should point to the beginning of a new page, i.e., the byte offset will be 0.
Thus the full 32-byte capacity of the scratchpad is available, resulting also in the ending offset of 1FH.
R

However, it is possible to write one or several contiguous bytes somewhere within a page. The ending
offset together with the Partial Flag support the master checking the data integrity after a Write command.
ot

The highest valued bit of the E/S register, called AA or Authorization Accepted, acts as a flag to indicate
that the data stored in the scratchpad has already been copied to the target memory address. Writing data
N

to the scratchpad clears this flag.

3 of 25
DS2423
HIERARCHICAL STRUCTURE FOR 1-WIRE PROTOCOL Figure 2

gn
DS2423

i
es
D
ew
DS2423 SPECIFIC MEMORY
FUNCTION COMMANDS

rN
(SEE FIGURE 7)

fo
d
de

64-BIT LASERED ROM Figure 3


en

MSB LSB
8-BIT FAMILY CODE
8-BIT CRC CODE 48-BIT SERIAL NUMBER
(1DH = DS2423)
m

MSB LSB MSB LSB MSB LSB


om

1-WIRE CRC GENERATOR Figure 4


ec
R
ot
N

4 of 25
DS2423
WRITING WITH VERIFICATION
To write data to the DS2423, the scratchpad has to be used as intermediate storage. First the master issues
the Write Scratchpad command to specify the desired target address, followed by the data to be written to
the scratchpad. Under certain conditions (see Write Scratchpad command) the master will receive an
inverted CRC16 of the command, address and data at the end of the Write Scratchpad command
sequence. Knowing this CRC value, the master can compare it to the value it has calculated itself to
decide if the communication was successful and proceed to the Copy Scratchpad command. If the master

gn
could not receive the CRC16, it has to send the Read Scratchpad command to read back the scratchpad to
verify data integrity. As preamble to the scratchpad data, the DS2423 repeats the target address TA1 and
TA2 and sends the contents of the E/S register. If the PF flag is set, data did not arrive correctly in the

i
es
scratchpad. The master does not need to continue reading; it can start a new trial to write data to the
scratchpad. Similarly, a set AA flag indicates that the Write command was not recognized by the device.
If everything went correctly, both flags are cleared and the ending offset indicates the address of the last

D
byte written to the scratchpad. Now the master can continue reading and verifying every data byte. After
the master has verified the data, it has to send the Copy Scratchpad command. This command must be

ew
followed exactly by the data of the three address registers TA1, TA2 and E/S. The master may obtain the
contents of these registers by reading the scratchpad or derive it from the target address and the amount of
data to be written. As soon as the DS2423 has received these bytes correctly, it will copy the data to the

rN
requested location beginning at the target address.

MEMORY FUNCTION COMMANDS fo


The Memory Function Flow Chart (Figure 7) describes the protocols necessary for accessing the memory.
An example follows the flowchart. The communication between master and DS2423 takes place either at
regular speed (default, OD = 0) or at Overdrive speed (OD = 1). If not explicitly set into the Overdrive
d

mode the DS2423 assumes regular speed.


de

Write Scratchpad Command [0FH]


After issuing the Write Scratchpad command, the master must first provide the 2-byte target address,
en

followed by the data to be written to the scratchpad. The data will be written to the scratchpad starting at
the byte offset (T4:T0). The ending offset (E4: E0) will be the byte offset at which the master stops
writing data. Only full data bytes are accepted. If the last data byte is incomplete its content will be
m

ignored and the partial byte flag PF will be set.


om

When executing the Write Scratchpad command the CRC generator inside the DS2423 (see Figure 12)
calculates a CRC over the entire data stream, starting at the command code and ending at the last data
byte sent by the master. This CRC is generated using the CRC16 polynomial by first clearing the CRC
ec

generator and then shifting in the command code (0FH) of the Write Scratchpad command, the Target
Addresses TA1 and TA2 as supplied by the master and all the data bytes. The master may end the Write
Scratchpad command at any time. However, if the ending offset is 11111b, the master may send 16 read
R

time slots and will receive the CRC generated by the DS2423.
ot

The memory address range of the DS2423 is 0000H to 01FFH. If the bus master sends a target address
higher than this, the internal circuitry of the chip will set seven most significant address bits to 0 as they
N

are shifted into the internal address register. The Read Scratchpad command will reveal the target address
as it will be used by the DS2423. The master will identify such address modifications by comparing the
target address read back to the target address transmitted. If the master does not read the scratchpad, a
subsequent Copy Scratchpad command will not work since the most significant bits of the target address
the master sends will not match the value the DS2423 expects.

5 of 25
DS2423
Read Scratchpad Command [AAH]
This command is used to verify scratchpad data and target address. After issuing the Read Scratchpad
command, the master begins reading. The first 2 bytes will be the target address. The next byte will be the
ending offset/data status byte (E/S) followed by the scratchpad data beginning at the byte offset (T4: T0).
The master may read data until the end of the scratchpad after which the data read will be all logic 1s.

Copy Scratchpad [5AH]

gn
This command is used to copy data from the scratchpad to memory. After issuing the Copy Scratchpad
command, the master must provide a 3-byte authorization pattern which can be obtained by reading the
scratchpad for verification. This pattern must exactly match the data contained in the three address

i
es
registers (TA1, TA2, E/S, in that order). If the pattern matches, the AA (Authorization Accepted) flag
will be set and the copy will begin. A pattern of alternating 1s and 0s will be transmitted after the data has
been copied until a Reset Pulse is issued by the master. Any attempt to reset the part will be ignored while

D
the copy is in progress. Copy typically takes 30µs. The data to be copied is determined by the three
address registers. The scratchpad data from the beginning offset through the ending offset will be copied

ew
to memory, starting at the target address. Anywhere from 1 to 32 bytes may be copied to memory with
this command. The AA flag will be cleared only by executing a Write Scratchpad command.

rN
fo
d
de
en
m
om
ec
R
ot
N

6 of 25
DS2423
DS2423 MEMORY MAP Figure 5

ign
es
D
ew
rN
fo
d
de
en
m

ADDRESS REGISTERS Figure 6


om
ec
R
ot
N

7 of 25
DS2423
Read Memory [F0H]
The read memory command may be used to read the entire memory. After issuing the command, the
master must provide the 2-byte target address. After the two bytes, the master reads data beginning from
the target address and may continue until the end of memory, at which point logic 1s will be read. It is
important to realize that the target address registers will contain the address provided. The ending
offset/data status byte is unaffected.

gn
The hardware of the DS2423 provides a means to accomplish error-free writing to the memory section.
To safeguard reading data in the 1-Wire environment and to simultaneously speed up data transfers, it is
recommended to packetize data into data packets of the size of one memory page each. Such a packet

i
would typically store a 16-bit CRC with each page of data to ensure rapid, error-free data transfers that

es
eliminate having to read a page multiple times to determine if the received data is correct or not. (See
Application Note 114 for the recommended file structure.)

D
Read Memory + Counter [A5H]
The Read Memory + Counter command is used to read memory data together with the write cycle counter

ew
or externally triggered counter associated with the addressed page of data memory. The additional
information is transmitted by the DS2423 as the end of a memory page is encountered. Following the
current value of the counter the DS2423 transmits 32 0-bits and a 16-bit CRC generated by the DS2423.

rN
After having sent the command code of the Read Memory + Counter command, the bus master sends a
two-byte address (TA1 = (T7:T0), TA2 = (T15:T8)) that indicates a starting byte location within the data
fo
field. With the subsequent read data time slots the master receives data from the DS2423 starting at the
initial address and continuing until the end of a 32-byte page is reached. At that point the bus master will
send 80 additional read data time slots and receive the contents of the 32-bit counter associated with the
d

addressed page, 32 0-bits and a 16-bit CRC. With subsequent read data time slots the master will receive
data starting at the beginning of the next page followed by the contents of the counter associated with the
de

page, 0-bits and CRC for that page. This sequence will continue until the final page and its accompanying
data is read by the bus master. When applying the Read Memory + Counter command to a page that does
en

not have a counter associated, the master will read FFFFFFFFH instead of a valid count.
With the initial pass through the Read Memory + Counter flow chart the 16-bit CRC value is the result of
m

shifting the command byte into the cleared CRC generator, followed by the two address bytes, the
contents of the data memory, the counter and the 0-bits. Subsequent passes through the Read Memory +
om

Counter flow chart will generate a 16-bit CRC that is the result of clearing the CRC generator and then
shifting in the contents of the data memory page, its associated counter and 0-bits. After the 16-bit CRC
of the last page is read, the bus master will receive logical 1s from the DS2423 until a Reset Pulse is
issued. The Read Memory + Counter command sequence can be ended at any point by issuing a Reset
ec

Pulse.
R
ot
N

8 of 25
DS2423
MEMORY FUNCTION FLOW CHART Figure 7
1)
Master TX Memory From ROM Functions
Function Command Flow Chart (Figure 9)

To Figure 7
0FH N AAH 2nd Part
Write Read
Scratchpad Scratchpad N

gn
Y Y
Master TX 1) Master RX 1)
TA1 (T7:T0) TA1 (T7:T0)

i
1)

es
Master TX 1) Master RX
TA2 (T15:T8) TA2 (T15:T8)

DS2423 sets Scratch- Master RX Ending 1)

D
pad Offset = (T4:T0) Offset with Data
and Clears (PF, AA) Status (E/S)

ew
DS2423 sets Scratch-
Master TX Data Byte 1) pad Offset = (T4:T0)
to Scratchpad Offset

DS2423 sets (E4:E0) Master RX Data Byte 1)

rN
= Scratchpad Offset from Scratchpad Offset

2) 2)
Master Y Master Y
TX Reset? TX Reset?
fo
DS2423 Incre- DS2423 Incre-
ments Scratch- N ments Scratch- N
pad Offset pad Offset
Scratch- Scratch-
d

pad Offset = pad Offset =


N 11111b? N 11111b?
de

Partial Y
Y Y
Byte Written?
Master RX "1"s 1)
Y Master
en

TX Reset? N PF = 1
2)
N
m

Master RX CRC16 of 1)
Command, Address, Data
om

2)
Y Master
TX Reset?
ec

N
Master RX "1"s 1)
R
ot

1) To be transmitted or received at Overdrive speed if OD = 1. From Figure 7


To ROM Functions 2nd Part
N

2) Reset Pulse to be transmitted at Overdrive speed if OD = 1.


Reset Pulse to be transmitted at normal speed if OD = 0 or if Flow Chart (Figure 9)
the DS2423 is to be reset from Overdrive speed to regular
speed.

9 of 25
DS2423
MEMORY FUNCTION FLOW CHART Figure 7 cont’d

From Figure 7 To Figure 7


1st Part 55H N F0H 3rd Part
Copy Read
Scratchpad Memory N

gn
Y Y
Master TX 1) Master TX 1)
TA1 (T7:T0) TA1 (T7:T0)

i
es
Master TX 1) Master TX 1)
TA2 (T15:T8) TA1 (T7:T0)

D
Master TX 1) DS2423 sets Memory
E/S Byte Address = (T15:T0)

ew
N Master RX Data Byte 1)
Authorization
Code Match? from Memory Address

DS2423 Incre-
Y

rN
ments Address
AA = 1 Counter 2)
Master
DS2423 Copies Scratchpad TX Reset?
Y
Data to Memory fo N

N End of
Master 1) Master 1)
Memory?
d
RX "1"s RX "1"s
Copying Y 1)
de

N Finished N
Master Master RX "0"s
TX Reset?
Y
en

DS2423 TX "0" 1) Y

2)
Master Y
m

TX Reset?

N
om

1)
DS2423 TX "1"

2)
Master
ec

TX Reset?
N
Y
R
ot

To Figure 7 From Figure 7


N

1) To be transmitted or received at Overdrive speed if OD = 1.


1st Part 2) Reset Pulse to be transmitted at Overdrive speed if OD = 1.
rd
3 Part
Reset Pulse to be transmitted at normal speed if OD = 0 or if
the DS2423 is to be reset from Overdrive speed to regular
speed.

10 of 25
DS2423
MEMORY FUNCTION FLOW CHART Figure 7 cont’d

From Figure 7
nd
2 Part A5H N
Read Memory
+ Counter
Y

gn
Master TX 1)
TA1 (T7:T0)

Master TX 1)

i
TA2 (T15:T8)

es
DS2423 Sets Memory
Address = (T15:T0)

D
Master RX Data 1)

ew
From Memory

Y 2)
Master
TX Reset?

rN
DS2423 Increments
Address Counter
N

End of fo
Page?
N
Y
Master RX Counter 1) 2)
d

Value of Memory Page Master


de

TX Reset?
Master RX 32 Zero Bits 1) N

Master RX CRC 16 of Command, Address, Y


1)
en

Data, Counter, Zero Bits (1st Pass)


CRC 16 of Data, Counter, Zero Bits
(Subsequent Passes)
m

2)
Master TX CRC
Reset Correct?
om

N
Y

End of N
ec

Memory?

Y
R

2) Master RX "1"s 1)
Master
TX Reset?
ot

N
Y
N

To Figure 7 1) To be transmitted or received at Overdrive speed if OD = 1.


2nd Part 2) Reset Pulse to be transmitted at Overdrive speed if OD = 1.
Reset Pulse to be transmitted at normal speed if OD = 0 or if
the DS2423 is to be reset from Overdrive speed to regular
speed.

11 of 25
DS2423
MEMORY FUNCTION EXAMPLE
Example: Write two data bytes to memory location 0026 and 0027. Read entire memory.

MASTER MODE DATA (LSB FIRST) COMMENTS


TX Reset Reset pulse (480-960 µs)
RX Presence Presence pulse

gn
TX CCh Issue “skip ROM” command
TX 0Fh Issue “write scratchpad” command
TX 26h TA1, beginning offset=26h

i
es
TX 00h TA2, address=0026h
TX <2 data bytes> Write 2 bytes of data to scratchpad
TX Reset Reset pulse

D
RX Presence Presence pulse
TX CCh Issue “skip ROM” command

ew
TX AAh Issue “read scratchpad” command
RX 26h Read TA1, beginning offset=26h
RX 00h Read TA2, address=0026h

rN
RX 07h Read E/S, ending offset=7h, flags=0h
RX <2 data bytes> Read scratchpad data and verify
TX Reset Reset pulse
fo
RX Presence Presence pulse
TX CCh Issue “skip ROM” command
TX 5Ah Issue “copy scratchpad” command
d

TX 26h TA1
de

TX 00h TA2 AUTHORIZATION CODE


TX 07h E/S
TX Reset Reset pulse
en

RX Presence Presence pulse


TX CCh Issue “skip ROM” command
m

TX F0h Issue “read memory” command


TX 00h TA1, beginning offset=0
om

TX 00h TA2, address=0000h


RX <512 bytes> Read entire memory
TX Reset Reset pulse
RX Presence Presence pulse, done
ec
R
ot
N

12 of 25
DS2423
MEMORY FUNCTION EXAMPLE
Read page 14 and counts of Input A. Rewrite page 14 with 32 bytes. Read Memory + Counter, Write
Scratchpad, Copy Scratchpad.

MASTER MODE DATA (LSB FIRST) COMMENTS


TX Reset Reset pulse (480-960 µs)

gn
RX Presence Presence pulse
TX CCh Issue “skip ROM” command
TX A5h Issue “read memory + counter” command

i
TX C0h TA1, beginning offset=C0h

es
TX 01h TA2, address=01C0h
RX <32 data bytes> Read 32 bytes of data

D
RX <4 data bytes> Read Counts of Input A
RX <4 data bytes> Read 32 Zero Bits

ew
RX <2 data bytes> Read (inverted) CRC16
TX Reset Reset pulse
RX Presence Presence pulse

rN
TX CCh Issue “skip ROM” command
TX 0Fh Issue “write scratchpad” command
TX C0h TA1, beginning offset=C0h
fo
TX 01h TA2, address=01C0h
TX <32 data bytes> Read 32 bytes of data to scratchpad
RX <2 data bytes> Read (inverted) CRC16
d

TX Reset Reset pulse


de

RX Presence Presence pulse


TX CCh Issue “skip ROM” command
TX 5Ah Issue “copy scratchpad” command
en

TX C0h TA1
TX 01h TA2 AUTHORIZATION CODE
E/S
m

TX 1Fh
RX <1 data byte> Read Copy Scratchpad response
om

TX Reset Reset pulse


RX Presence Presence pulse, done
ec
R
ot
N

13 of 25
DS2423
HARDWARE CONFIGURATION Figure 8

DS2423

RPU

i gn
es
D
ew
Note: Depending on the 1-Wire communication speed and the bus load characteristics, the optimal pull-
up resistor (RPU) value will be in the 1.5kΩ to 5kΩ range.

1-WIRE BUS SYSTEM

rN
The 1-Wire bus is a system which has a single bus master and one or more slaves. In all instances the
DS2423 is a slave device. The bus master is typically a microcontroller. The discussion of this bus
system is broken down into three topics: hardware configuration, transaction sequence, and 1-Wire
fo
signaling (signal types and timing). A 1-Wire protocol defines bus transactions in terms of the bus state
during specific time slots that are initiated on the falling edge of sync pulses from the bus master.
d

HARDWARE CONFIGURATION
de

The 1-Wire bus has only a single line by definition; it is important that each device on the bus be able to
drive it at the appropriate time. To facilitate this, each device attached to the 1-Wire bus must have open-
en

drain or 3-state outputs. The 1-Wire port of the DS2423 is open drain with an internal circuit equivalent
to that shown in Figure 8. A multidrop bus consists of a 1-Wire bus with multiple slaves attached. At
regular speed the 1-Wire bus has a maximum data rate of 16.3kbits per second. The speed can be boosted
m

to 142kbits per second by activating the Overdrive mode. The 1-Wire bus requires a pullup resistor of
approximately 5kΩ. The 1-Wire bus requires a pullup resistor range of 1.5kΩ to 5kΩ, depending on the
om

bus load characteristics.

The idle state for the 1-Wire bus is high. If for any reason a transaction needs to be suspended, the bus
ec

MUST be left in the idle state if the transaction is to resume. If this does not occur and the bus is left low
for more than 16µs (Overdrive speed) or more than 120µs (regular speed), one or more devices on the bus
may be reset.
R

TRANSACTION SEQUENCE
ot

The protocol for accessing the DS2423 via the 1-Wire port is as follows:
N

ƒ Initialization
ƒ ROM Function Command
ƒ Memory Function Command
ƒ Transaction/Data

14 of 25
DS2423
INITIALIZATION
All transactions on the 1-Wire bus begin with an initialization sequence. The initialization sequence
consists of a Reset Pulse transmitted by the bus master followed by Presence Pulse(s) transmitted by the
slave(s).

The Presence Pulse lets the bus master know that the DS2423 is on the bus and is ready to operate. For
more details, see the 1-Wire Signaling section.

gn
ROM FUNCTION COMMANDS
Once the bus master has detected a presence, it can issue one of the six ROM function commands. All

i
ROM function commands are 8 bits long. A list of these commands follows (refer to flowchart in Figure

es
9):

D
Read ROM [33H]
This command allows the bus master to read the DS2423’s 8-bit family code, unique 48-bit serial

ew
number, and 8-bit CRC. This command can only be used if there is a single DS2423 on the bus. If more
than one slave is present on the bus, a data collision will occur when all slaves try to transmit at the same
time (open drain will produce a wired-AND result). The resultant family code and 48-bit serial number
will result in a mismatch of the CRC.

rN
Match ROM [55H]
The match ROM command, followed by a 64-bit ROM sequence, allows the bus master to address a
fo
specific DS2423 on a multidrop bus. Only the DS2423 that exactly matches the 64-bit ROM sequence
will respond to the following memory function command. All slaves that do not match the 64-bit ROM
sequence will wait for a Reset Pulse. This command can be used with a single or multiple devices on the
d

bus.
de

Skip ROM [CCH]


This command can save time in a single-drop bus system by allowing the bus master to access the
en

memory functions without providing the 64-bit ROM code. If more than one slave is present on the bus
and a read command is issued following the Skip ROM command, data collision will occur on the bus as
m

multiple slaves transmit simultaneously (open drain pulldowns will produce a wired-AND result).
om

Search ROM [F0H]


When a system is initially brought up, the bus master might not know the number of devices on the 1-
Wire bus or their 64-bit ROM codes. The search ROM command allows the bus master to use a process
of elimination to identify the 64-bit ROM codes of all slave devices on the bus. The search ROM process
ec

is the repetition of a simple, three-step routine: read a bit, read the complement of the bit, then write the
desired value of that bit. The bus master performs this simple, three-step routine on each bit of the ROM.
R

After one complete pass, the bus master knows the contents of the ROM in one device. The remaining
number of devices and their ROM codes may be identified by additional passes. See Application Note
ot

187 for a comprehensive discussion of a search ROM, including an actual example.

Overdrive Skip ROM [3CH]


N

On a single-drop bus this command can save time by allowing the bus master to access the memory
functions without providing the 64-bit ROM code. Unlike the normal Skip ROM command the Overdrive
Skip ROM sets the DS2423 in the Overdrive mode (OD = 1). All communication following this
command has to occur at Overdrive speed until a Reset Pulse of minimum 480µs duration resets all
devices on the bus to regular speed (OD = 0).

15 of 25
DS2423
When issued on a multidrop bus, this command will set all Overdrive-supporting devices into Overdrive
mode. To subsequently address a specific Overdrive-supporting device, a Reset Pulse at Overdrive speed
has to be issued followed by a Match ROM or Search ROM command sequence. This will speed up the
time for the search process. If more than one slave supporting Overdrive is present on the bus and the
Overdrive Skip ROM command is followed by a read command, data collision will occur on the bus as
multiple slaves transmit simultaneously (open drain pulldowns will produce a wired-AND result).

gn
Overdrive Match ROM [69H]
The Overdrive Match ROM command, followed by a 64-bit ROM sequence transmitted at Overdrive
speed, allows the bus master to address a specific DS2423 on a multidrop bus and to simultaneously set it

i
es
in Overdrive mode. Only the DS2423 that exactly matches the 64-bit ROM sequence will respond to the
subsequent memory function command. Slaves already in Overdrive mode from a previous Overdrive
Skip or Match command will remain in Overdrive mode. All other slaves that do not match the 64-bit

D
ROM sequence or do not support Overdrive will return to or remain at regular speed and wait for a Reset
Pulse of minimum 480 µs duration. The Overdrive Match ROM command can be used with a single or

ew
multiple devices on the bus.

rN
fo
d
de
en
m
om
ec
R
ot
N

16 of 25
DS2423
ROM FUNCTIONS FLOW CHART Figure 9 (First Part)

Master TX
Reset Pulse
From Memory Functions
Flow Chart (Figure 7)
From Figure 9
2nd Part
Short N
Reset Pulse?

gn
OD = 0
Y

i
DS2423 TX 2)

es
Presence Pulse

Master TX ROM 1)
Function Command

D
To Figure 9
33H 55H F0H 2nd Part

ew
N N N
Read Match Search
ROM? ROM? ROM?
Y Y Y

rN
DS2423 TX 1) DS2423 TX Bit 0
fo 1)
Family Code Master TX Bit 0 1) DS2423 TX Bit 0 1)
1 Byte
Master TX Bit 0 1)
d
N N
Bit 0 Match? Bit 0 Match?
de

Y Y
DS2423 TX 1) DS2423 TX Bit 1 1)
Serial Number Master TX Bit 1 1) DS2423 TX Bit 1 1)
en

6 Bytes
Master TX Bit 1 1)

N N
m

Bit 1 Match? Bit 1 Match?

Y Y
om

DS2423 TX 1) DS2423 TX Bit 63 1)


CRC Byte Master TX Bit 63 1) DS2423 TX Bit 63 1)
Master TX Bit 63 1)
ec

N N
Bit 63 Match? Bit 63 Match?
To Figure 9
Y Y 2nd Part
R
ot

1) To be transmitted or received at Overdrive speed if From Figure 9


OD = 1. To Memory Functions nd
2 Part
2) The Presence Pulse will be short if OD = 1. Flow Chart (Figure 7)
N

17 of 25
DS2423
ROM FUNCTIONS FLOW CHART Figure 9 cont’d

To Figure 9
1st Part

i gn
es
D
From Figure 9
1st Part CCH N 3CH 69H

ew
N N
Skip Overdrive Overdrive
ROM? Skip ROM? Match?
Y Y Y

rN
OD = 1 OD = 1

fo Master TX Bit 0 3)
d
N
Bit 0 Match?
de

Master TX Bit 1 3)
en

Y
Master TX N
m

Reset Pulse? Bit 1 Match?

N Y
om

Master TX Bit 63 3)
ec

N
Bit 63 Match?
From Figure 9
1st Part Y
R
ot

To Figure 9 3) Always to be transmitted at Overdrive speed.


st
1 Part
N

18 of 25
DS2423
1-WIRE SIGNALING
The DS2423 requires strict protocols to ensure data integrity. The protocol consists of four types of
signaling on one line: Reset Sequence with Reset Pulse and Presence Pulse, Write 0, Write 1 and Read
Data. The bus master initiates all these signals except Presence Pulse. The DS2423 can communicate at
two different speeds, regular speed and Overdrive speed. If not explicitly set into the Overdrive mode, the
DS2423 will communicate at regular speed. While in Overdrive mode the fast timing applies to all
waveforms.

gn
The initialization sequence required to begin any communication with the DS2423 is shown in Figure 10.
A Reset Pulse followed by a Presence Pulse indicates the DS2423 is ready to send or receive data given

i
the correct ROM command and memory function command. The bus master transmits (TX) a Reset

es
Pulse (tRSTL, minimum 480 µs at regular speed, 48 µs at Overdrive speed). The bus master then releases
the line and goes into receive mode (RX). The 1-Wire bus is pulled to a high state via the pullup resistor.

D
After detecting the rising edge on the data pin, the DS2423 waits (tPDH, 15-60µs at regular speed, 2-6µs at
Overdrive speed) and then transmits the Presence Pulse (tPDL, 60-240µs at regular speed, 8-24µs at
Overdrive speed).

ew
A Reset Pulse of 480µs or longer will exit the Overdrive mode returning the device to regular speed. If
the DS2423 is in Overdrive mode and the Reset Pulse is no longer than 80µs the device will remain in

rN
Overdrive mode.

Read/Write Time Slots fo


The definitions of write and read time slots are illustrated in Figure 11. All time slots are initiated by the
master driving the data line low. The falling edge of the data line synchronizes the DS2423 to the master
by triggering a delay circuit in the DS2423. During write time slots, the delay circuit determines when the
d

DS2423 will sample the data line. For a read data time slot, if a “0” is to be transmitted, the delay circuit
de

determines how long the DS2423 will hold the data line low overriding the 1 generated by the master. If
the data bit is a “1”, the device will leave the read data time slot unchanged.
en

INITIALIZATION PROCEDURE “RESET AND PRESENCE PULSES” Figure 10


m
om
ec
R
ot
N

DS2423

19 of 25
DS2423
READ/WRITE TIMING DIAGRAM Figure 11
Write-One Time Slot
VPUP TLOW1
VPUPMIN
VTH
VLOW1

gn
0V

i
es
tSLOT tREC

D
RESISTOR MASTER DS2423

ew
Write-Zero Time Slot
tSLOT
VPUP

rN
VPUPMIN
VIHMIN
VILMAX fo
0V
tREC
d

tL0W0
de

RESISTOR MASTER DS2423


en
m
om
ec
R
ot
N

20 of 25
DS2423
Read-Data Time Slot

VPUP tSU tRDV


VPUPMIN
VIHMIN
Master
VILMAX Sampling

gn
Window
0V
tLOWR tREC
tRELEASE

i
es
tSLOT

RESISTOR MASTER DS2423

D
ew
CRC GENERATION
With the DS2423 there are two different types of CRCs (Cyclic Redundancy Checks). One CRC is an 8-
bit type and is stored in the most significant byte of the 64-bit ROM. The bus master can compute a CRC

rN
value from the first 56 bits of the 64-bit ROM and compare it to the value stored within the DS2423 to
determine if the ROM data has been received error-free by the bus master. The equivalent polynomial
function of this CRC is: X8 + X5 + X4 + 1. This 8-bit CRC is received in the true (non-inverted) form
when reading the ROM of the DS2423. It is computed at the factory and lasered into the ROM.
fo
The other CRC is a 16-bit type, generated according to the standardized CRC16-polynomial function x16
d

+ x15 + x2 + 1. This CRC is used for error detection when reading Data Memory using the Read Memory
+ Counter command and for fast verification of a data transfer when writing to the scratchpad. It is the
de

same type of CRC as is used with NV RAM based iButtons® for error detection within the iButton
Extended File Structure. In contrast to the 8-bit CRC, the 16-bit CRC is always returned or sent in the
en

complemented (inverted) form. A CRC-generator inside the DS2423 chip (Figure 12) will calculate a new
16-bit CRC as shown in the command flow chart of Figure 7. The bus master compares the CRC value
read from the device to the one it calculates from the data and decides whether to continue with an
m

operation or re-read the portion of the data with the CRC error.
om

With the initial pass through the Read Memory + Counter flow chart the 16-bit CRC value is the result of
shifting the command byte into the cleared CRC generator, followed by the two address bytes, data bytes,
value of the counter associated with the page and zero bits. Subsequent passes through the Read Memory
ec

+ Counter flow chart will generate a 16-bit CRC that is the result of clearing the CRC generator and then
shifting in the data bytes, the value of the counter and the zero bits.
R

With the Write Scratchpad command the CRC is generated by first clearing the CRC generator and then
shifting in the command code, the Target Addresses TA1 and TA2 and all the data bytes. The DS2423
ot

will transmit this CRC only if the data bytes written to the scratchpad include scratchpad ending offset
11111b. The data may start at any location within the scratchpad.
N

For more details on generating CRC values including example implementations in both hardware and
software, see Application Note 27.
iButton is a registered trademark of Dallas Semiconductor, a wholly owned subsidiary of Maxim Integrated Products Inc.

21 of 25
DS2423
CRC-16 HARDWARE DESCRIPTION AND POLYNOMIAL Figure 12

i gn
es
D
ew
rN
fo
d
de
en
m
om
ec
R
ot
N

22 of 25
DS2423
ABSOLUTE MAXIMUM RATINGS*
Voltage on Any Pin Relative to Ground -0.5V to +7.0V
Operating Temperature Range -40°C to +85°C
Storage Temperature Range -55°C to +125°C
Soldering Temperature See J-STD-020A Specifications

* This is a stress rating only and functional operation of the device at these or any other conditions

gn
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.

i
DC CHARACTERISTICS (VPUP = 2.8V to 6.0V; VBAT = 2.8 to 5.5V;-40°C to +85°C)

es
PARAMETER SYMBOL MIN TYP MAX UNITS NOTES
Logic 1 VIH 2.2 V 1, 8

D
Logic 0 VIL -0.3 +0.8 V 1, 9
Output Logic Low @ 4 mA VOL 0.4 V 1

ew
Output Logic High VOH VPUP 6.0 V 1, 2
Input Load Current IL 5 µA 3
Standby Current IBATS 200 nA

rN
I/O Operate Charge QBATO 200 nC 12, 16

CAPACITANCE fo (tA = 25°C)


PARAMETER SYMBOL MIN TYP MAX UNITS NOTES
I/O (1-Wire) CIN/OUT 100 800 pF 6, 16
d

COUNTER INPUT CHARACTERISTICS


de

(VPUP = 2.8V to 6.0V; VBAT = 2.8 to 5.5V;-40°C to +85°C)


PARAMETER SYMBOL MIN TYP MAX UNITS NOTES
en

½
Trip Point VTRIP V
VBAT
VBAT
m

Logic 1 VINH VTRIP V 1, 10


+0.3
Logic 0 VINL -0.3 VTRIP V 1
om

Internal Pullup Resistor RPI 28 Mς 11, 16


Debounce Time TDEB 170 290 460 µs 13
Pulse Width (Active Low) TPW 1 µs 16
ec
R
ot
N

23 of 25
DS2423
AC CHARACTERISTICS REGULAR SPEED
(VPUP = 2.8V to 6.0V; VBAT = 2.8 to 5.5V;-40°C to +85°C)
PARAMETER SYMBOL MIN TYP MAX UNITS NOTES
Time Slot tSLOT 60 120 µs
Write 1 Low Time tLOW1 1 15 µs 15
Write 0 Low Time tLOW0 60 120 µs
Read Low Time tLOWR 1 15 µs 15

gn
Read Data Valid tRDV 15 µs 14, 16
Release Time tRELEASE 0 15 45 µs

i
Read Data Setup tSU 1 µs 5

es
Recovery Time tREC 1 µs
Reset Time High tRSTH 480 µs 4

D
Reset Time Low tRSTL 480 960 µs 7
Presence Detect High tPDH 15 60 µs
Presence Detect Low tPDL 60 240 µs

ew
AC CHARACTERISTICS OVERDRIVE SPEED
(VPUP = 2.8V to 6.0V; VBAT = 2.8 to 5.5V;-40°C to +85°C)

rN
PARAMETER SYMBOL MIN TYP MAX UNITS NOTES
Time Slot tSLOT fo 6 16 µs
Write 1 Low Time tLOW1 1 2 µs 15
Write 0 Low Time tLOW0 6 16 µs
Read Low Time tLOWR 1 2 µs 15
d

Read Data Valid tRDV 2 µs 14, 16


de

Release Time tRELEASE 0 1.5 4 µs


Read Data Setup tSU 1 µs 5
Recovery Time tREC 1 µs
en

Reset Time High tRSTH 48 µs 4


Reset Time Low tRSTL 48 80 µs
Presence Detect High tPDH 2 6 µs
m

Presence Detect Low tPDL 8 24 µs


om
ec
R
ot
N

24 of 25
DS2423
NOTES:
1) All voltages are referenced to ground.

2) VPUP = external pullup voltage.

3) Input load is to ground.

gn
4) An additional reset or communication sequence cannot begin until the reset high time has expired.

5) Read data setup time refers to the time the host must pull the 1-Wire bus low to read a bit. Data is

i
es
guaranteed to be valid within 1µs of this falling edge.

6) Capacitance on the data pin could be 800pF when power is first applied. If a 5kΩ resistor is used to

D
pull up the data line to VPUP, 5µs after power has been applied the parasite capacitance will not affect
normal communications.

ew
7) The reset low time (tRSTL) should be restricted to a maximum of 960µs, to allow interrupt signaling,
otherwise, it could mask or conceal interrupt pulses.

rN
8) VIH is a function of the external pullup resistor and VPUP.

9) Under certain low voltage conditions VILMAX may have to be reduced to as much as 0.5V to always
fo
guarantee a Presence Pulse.
d

10) The counter inputs are designed for interfacing to mechanical switches and piezo sensors. If
interfacing to digital circuits, one should use an open drain driver.
de

11) A lower impedance pullup, e. g., for reed switches, can be achieved by connecting an external resistor
en

from the counter input to VBAT.

12) Read and write scratchpad (all 32 bytes) at VBAT of 3.0 V.


m

13) Each low-going edge on a counter input resets the channel’s debounce timer. The debounce time
om

starts as the input voltage rises beyond the trip point. In order for the next pulse to be counted the
debounce time must have expired.
ec

14) The optimal sampling point for the master is as close as possible to the end time of the tRDV period
without exceeding tRDV. For the case of a Read-One Time slot, this maximizes the amount of time for
the pullup resistor to recover to a high level. For a Read-Zero Time slot, it ensures that a read will
R

occur before the fastest 1-Wire device(s) releases the line.


ot

15) The duration of the low pulse sent by the master should be a minimum of 1μs with a maximum value
as short as possible to allow time for the pullup resistor to recover the line to a high level before the 1-
N

Wire device samples in the case of a Write-One Time or before the master samples in the case of a
Read-One Time.

16) Guaranteed by design; not production tested.

25 of 25
DS2423

Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are implied.
Maxim reserves the right to change the circuitry and specifications without notice at any time. The parametric values (min and max limits) shown in the Electrical
Characteristics table are guaranteed. Other parametric values quoted in this data sheet are provided for guidance.
Maxim Integrated 160 Rio Robles, San Jose, CA 95134 USA 1-408-601-1000 26
©  Maxim Integrated The Maxim logo and Maxim Integrated are trademarks of Maxim Integrated Products, Inc.

You might also like