Dallas DS1820 Instruction Download Page 6

DS1820

021497 6/27

64–BIT LASERED ROM

Each DS1820 contains a unique ROM code that is
64–bits long. The first eight bits are a 1–Wire family
code (DS1820 code is 10h). The next 48 bits are a
unique serial number. The last eight bits are a CRC of
the first 56 bits. (See Figure 5.) The 64–bit ROM and
ROM Function Control section allow the DS1820 to
operate as a 1–Wire device and follow the 1–Wire proto-
col detailed in the section “1–Wire Bus System”. The
functions required to control sections of the DS1820 are
not accessible until the ROM function protocol has been
satisfied. This protocol is described in the ROM function
protocol flowchart (Figure 6). The 1–Wire bus master
must first provide one of five ROM function commands:
1) Read ROM, 2) Match ROM, 3) Search ROM, 4) Skip
ROM, or 5) Alarm Search. After a ROM functions
sequence has been successfully executed, the func-
tions specific to the DS1820 are accessible and the bus
master may then provide and one of the six memory and
control function commands.

CRC GENERATION

The DS1820 has an 8–bit CRC stored in the most signif-
icant byte of the 64–bit ROM. The bus master can com-
pute a CRC value from the first 56–bits of the 64–bit
ROM and compare it to the value stored within the
DS1820 to determine if the ROM data has been
received error–free by the bus master. The equivalent
polynomial function of this CRC is:

CRC = X

8

 + X

5

 + X

4

 + 1

The DS1820 also generates an 8–bit CRC value using
the same polynomial function shown above and pro-

vides this value to the bus master to validate the transfer
of data bytes. In each case where a CRC is used for data
transfer validation, the bus master must calculate a
CRC value using the polynomial function given above
and compare the calculated value to either the 8–bit
CRC value stored in the 64–bit ROM portion of the
DS1820 (for ROM reads) or the 8–bit CRC value com-
puted within the DS1820 (which is read as a ninth byte
when the scratchpad is read). The comparison of CRC
values and decision to continue with an operation are
determined entirely by the bus master. There is no cir-
cuitry inside the DS1820 that prevents a command
sequence from proceeding if the CRC stored in or calcu-
lated by the DS1820 does not match the value gener-
ated by the bus master.

The 1–Wire CRC can be generated using a polynomial
generator consisting of a shift register and XOR gates
as shown in Figure 7. Additional information about the
Dallas 1–Wire Cyclic Redundancy Check is available in
Application Note 27 entitled “Understanding and Using
Cyclic Redundancy Checks with Dallas Semiconductor
Touch Memory Products”.

The shift register bits are initialized to zero. Then start-
ing with the least significant bit of the family code, one bit
at a time is shifted in. After the 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
eight bits of CRC should return the shift register to all
zeros.

64–BIT LASERED ROM Figure 5

8–BIT CRC CODE

48–BIT SERIAL NUMBER

8–BIT FAMILY CODE (10h)

MSB

LSB

MSB

LSB

MSB

LSB

Summary of Contents for DS1820

Page 1: ...roducts thermometers or any thermally sensitive system PIN ASSIGNMENT 3 2 1 DALLAS DS2434 GND DQ VDD DALLAS DS1820 3 2 1 DS1820S 16 PIN SSOP DS1820 PR35 PACKAGE 1 2 3 4 5 6 7 8 16 15 14 13 12 11 10 9...

Page 2: ...ive ROM function commands 1 Read ROM 2 Match ROM 3 Search ROM 4 Skip ROM or 5 Alarm Search These commands operate on the 64 bit lasered ROM portion of each device and can single out a specific device...

Page 3: ...DS1820 is through the use of an external power supply tied to the VDD pin as shown in Figure 3 The advantage to this is thatthe strong pull up is not required on the I O line and the bus master need n...

Page 4: ...unter to go through for each incremental degree in temperature To obtain the desired resolution therefore both the value of the counter and the number of counts per degree C the value of the slope acc...

Page 5: ...med a temperature conver sion the temperature value is compared to the trigger values stored in TH and TL Since these registers are 8 bit only the 0 5 C bit is ignored for comparison The most signific...

Page 6: ...shown above and pro vides this value to the bus master to validate the transfer of data bytes In each case where a CRC is used for data transfer validation the bus master must calculate a CRC value us...

Page 7: ...TES DS1820 TX CRC BYTE N N N Y Y Y N N Y N N Y Y Y DS1820 TX BIT 0 DS1820 TX BIT 0 DS1820 TX BIT 1 DS1820 TX BIT 1 DS1820 TX BIT 63 DS1820 TX BIT 63 MASTER TX BIT 1 MASTER TX BIT 0 MASTER TX BIT 0 MAS...

Page 8: ...s contain the measured temperature information The third and fourth bytes are volatile copies of TH and TL and are refreshed with every pow er on reset The next two bytes are not used upon reading bac...

Page 9: ...forthe 1 Wirebusishigh Ifforanyreason a transaction needs to be suspended the bus MUST be left in the idle state if the transaction is to resume Infinite recovery time can occur between bits so long...

Page 10: ...ue For alarming the trigger values stored in EEPROM are taken into account If an alarm condition exists and the TH or TL settings are changed another temperature conversion should be done to validate...

Page 11: ...ects ROM1 and ROM4 for the remainder of this search pass leaving only ROM2 and ROM3 coupled to the system 15 The bus master executes two read time slots and receives two zeros 16 The bus master writes...

Page 12: ...NS The following command protocols are summarized in Table 2 and by the flowchart of Figure 10 Write Scratchpad 4Eh This command writes to the scratchpad of the DS1820 starting at address 2 The next t...

Page 13: ...STER TX DATA BYTE TO SCRATCHPAD MASTER TX RESET ADDRESS 3 DS1820 INCREMENTS ADDRESS MASTER TX RESET BEh READ SCRATCHPAD DS1820 SETS ADDRESS COUNTER TO 0 MASTER RX DATA FROM SCRATCHPAD MASTER TX RESET...

Page 14: ...UP N N Y Y Y DS1820 CONVERTS TEMPERATURE MASTER DISABLES STRONG PULL UP DS1820 BEGINS CONVERSION MASTER TX RESET DEVICE BUSY CONVERTING TEMPERATURE MASTER RX 1 s MASTER RX 0 s MASTER TX RESET NONVOLA...

Page 15: ...10 cont d B8h RECALL E2 DS1820 RECALLS FROM E2 PROM MASTER TX RESET B4h READ POWER SUPPLY N N Y Y MASTER TX RESET N Y Y PARASITE POWERED MASTER RX 0 s N Y MASTER RX 1 s MASTER TX RESET N Y DEVICE BUSY...

Page 16: ...pies scratchpad into nonvolatile memory addresses 2 and 3 only 48h read copy status 2 Recall E2 Recalls values stored in nonvolatile memory into scratchpad tempera ture triggers B8h read temperature b...

Page 17: ...ode 0 parasite power 1 external power supply provided READ WRITE TIME SLOTS DS1820 data is read and written through the use of time slots to manipulate bits and a command word to specify the transacti...

Page 18: ...s 30 s 15 s 30 s DS1820 SAMPLES MIN TYP MAX MASTER READ 0 SLOT MASTER READ 1 SLOT 15 s 1 s MASTER SAMPLES 15 s 15 s DS1820 SAMPLES MIN TYP MAX 1 s tREC 1 s tREC 15 s 30 s 15 s MASTER SAMPLES LINE TYPE...

Page 19: ...1 S TRC MASTER SAMPLES 1 WIRE BUS VIH OF MASTER RECOMMENDED MASTER READ 1 TIMING Figure 14 VCC GND 15 s MASTER SAMPLES TRC SMALL TINIT SMALL 1 WIRE BUS VIH OF MASTER LINE TYPE LEGEND Bus master activ...

Page 20: ...miconductor Touch Memory Product Application Note 55 Extending the Contact Range of Touch Memories Application Note 74 Reading and Writing Touch Memories via Serial Interfaces Application Note 104 Min...

Page 21: ...HIGH I O line is held high for at least 500 ms by bus master to allow conversion to complete TX Reset Reset pulse RX Presence Presence pulse TX 55h Issue Match ROM command TX 64 bit ROM code Issue add...

Page 22: ...lse TX CCh Skip ROM command TX BEh Read Scratchpad command RX 9 data bytes Read entire scratchpad plus CRC The master now recal culates the CRC of the eight data bytes received from the scratchpad com...

Page 23: ...FFh all bits 1 TX Reset Reset pulse RX Presence Presence pulse TX CCh Skip ROM command TX BEh Read Scratchpad command RX 9 data bytes Read entire scratchpad plus CRC The master now recal culates the C...

Page 24: ...ility RECOMMENDED DC OPERATING CONDITIONS PARAMETER SYMBOL CONDITION MIN TYP MAX UNITS NOTES Supply Voltage VDD I O Functions 1 2 C Accurate Temperature Conversions 2 8 4 3 5 0 5 5 5 5 V 1 2 Data Pin...

Page 25: ...3 4 volts 2 All voltages are referenced to ground 3 Logic one voltages are specified at a source current of 1 mA 4 Logic zero voltages are specified at a sink current of 4 mA 5 IDD specified with VCC...

Page 26: ...WRITE ZERO TIME SLOT START OF NEXT CYCLE tREC tSLOT tLOW0 1 WIRE READ ZERO TIME SLOT START OF NEXT CYCLE tREC tSLOT tRDV 1 WIRE RESET PULSE RESET PULSE FROM HOST PRESENCE DETECT 1 WIRE PRESENCE DETECT...

Page 27: ...PERFORMANCE CURVE 55 35 15 5 25 45 65 85 105 125 5 4 3 2 1 1 2 3 UPPER LIMIT SPECIFICATION TYPICAL LOWER LIMIT SPECIFICATION DS1820 DIGITAL TERMOMETER AND THERMOSTAT TEMPERATURE READING ERROR ERROR de...

Reviews: