beautypg.com

Ds1822-par operation example 1, Ds1822-par operation example 2 – Rainbow Electronics DS1822-PAR User Manual

Page 16

background image

DS1822-PAR

16 of 19

DS1822-PAR OPERATION EXAMPLE 1

In this example there are multiple DS1822-PARs on the bus. The bus master initiates a temperature
conversion in a specific DS1822-PAR and then reads its scratchpad and recalculates the CRC to verify
the data.

MASTER MODE

DATA (LSB FIRST)

COMMENTS

TX

Reset

Master issues reset pulse.

RX

Presence

DS1822-PARs respond with presence pulse.

TX

55h

Master issues Match ROM command.

TX

64-bit ROM code

Master sends DS1822-PAR ROM code.

TX

44h

Master issues Convert T command.

TX

DQ line held high by

strong pullup

Master applies strong pullup to DQ for the duration of the
conversion (t

conv

).

TX

Reset

Master issues reset pulse.

RX

Presence

DS1822-PARs respond with presence pulse.

TX

55h

Master issues Match ROM command.

TX

64-bit ROM code

Master sends DS1822-PAR ROM code.

TX

BEh

Master issues Read Scratchpad command.

RX

9 data bytes

Master reads entire scratchpad including CRC. The master
then recalculates the CRC of the first eight data bytes from the
scratchpad and compares the calculated CRC with the read
CRC (byte 9). If they match, the master continues; if not, the
read operation is repeated.

DS1822-PAR OPERATION EXAMPLE 2

In this example there is only one DS1822-PAR on the bus. The master writes to the T

H

, T

L

, and

configuration registers in the DS1822-PAR scratchpad and then reads the scratchpad and recalculates the
CRC to verify the data. The master then copies the scratchpad contents to EEPROM.

MASTER MODE

DATA (LSB FIRST)

COMMENTS

TX

Reset

Master issues reset pulse.

RX

Presence

DS1822-PAR responds with presence pulse.

TX

CCh

Master issues Skip ROM command.

TX

4Eh

Master issues Write Scratchpad command.

TX

3 data bytes

Master sends three data bytes to scratchpad (T

H

, T

L

, and config).

TX

Reset

Master issues reset pulse.

RX

Presence

DS1822-PAR responds with presence pulse.

TX

CCh

Master issues Skip ROM command.

TX

BEh

Master issues Read Scratchpad command.

RX

9 data bytes

Master reads entire scratchpad including CRC. The master then
recalculates the CRC of the first eight data bytes from the
scratchpad and compares the calculated CRC with the read CRC
(byte 9). If they match, the master continues; if not, the read
operation is repeated.

TX

Reset

Master issues reset pulse.

RX

Presence

DS1822-PAR responds with presence pulse.

TX

CCh

Master issues Skip ROM command.

TX

48h

Master issues Copy Scratchpad command.

TX

DQ line held high by

strong pullup

Master applies strong pullup to DQ for at least 10 ms while copy
operation is in progress.