Ds1372, C, 32-bit, binary counter clock with 64-bit id – Rainbow Electronics DS1372 User Manual

Page 11

Advertising
background image

2) Slave transmitter mode (DS1372 read mode): The

first byte is received and handled as in the slave
receiver mode. However, in this mode, the direction
bit indicates that the transfer direction is reversed.
The DS1372 transmits serial data on SDA while the
serial clock is input on SCL. START and STOP con-
ditions are recognized as the beginning and end of
a serial transfer (see Figure 7). The slave address
byte is the first byte received after the master gener-
ates the START condition. The slave address byte
contains the 7-bit DS1372 address, which is 110100
and AD0. Each slave address is followed by the

direction bit (R/W), which is one for a read. The bit
position signified by A is compared to the value on
the AD0 pin. After receiving and decoding the slave
address byte, the device outputs an acknowledge
on the SDA line. The DS1372 then begins to transmit
data starting with the register address pointed to by
the register pointer. If the register pointer is not writ-
ten to before the initiation of a read mode, the first
address that is read is the last one stored in the reg-
ister pointer. The DS1372 must receive a "not
acknowledge" to end a read.

DS1372

______________________________________________________________________________________

11

...

A

XXXXXXXX

A

110100

S

AD0

0

XXXXXXXX

A

XXXXXXXX

A

XXXXXXXX

A

P

<SLAVE ADDRESS> <R/W> <WORD ADDRESS (n)> <DATA (n)> <DATA (n + 1)> <DATA (n + X)

S - START
A - ACKNOWLEDGE (ACK)
P - STOP
R/W - READ/WRITE OR DIRECTION BIT ADDRESS

DATA TRANSFERRED

(X + 1 BYTES + ACKNOWLEDGE)

MASTER TO SLAVE

SLAVE TO MASTER

Figure 6. Data Write—Slave Receiver Mode

...

A

XXXXXXXX

A

110100

S

1

XXXXXXXX

A

XXXXXXXX

A

XXXXXXXX

A

P

<SLAVE ADDRESS> <R/W> <DATA (n)> <DATA (n + 1)> <DATA (n + 2)> <DATA (n + X)>

S - START
A - ACKNOWLEDGE (ACK)
P - STOP
A - NOT ACKNOWLEDGE (NACK)
R/W - READ/WRITE OR DIRECTION BIT ADDRESS

DATA TRANSFERRED

(X + 1 BYTES + ACKNOWLEDGE)

NOTE: LAST DATA BYTE IS FOLLOWED BY A NACK.

MASTER TO SLAVE

SLAVE TO MASTER

AD0

Figure 7. Data Read (from Current Pointer Location)—Slave Transmitter Mode

S - START
Sr - REPEATED START
A - ACKNOWLEDGE (ACK)
P - STOP
A - NOT ACKNOWLEDGE (NACK)
R/W - READ/WRITE OR DIRECTION BIT ADDRESS

<R/W>

<R/W>

<WORD ADDRESS (n)>

<SLAVE ADDRESS (n)>

<SLAVE ADDRESS>

AD0

A

XXXXXXXX

A

110100A

110100A

S

Sr

0

AD0

A

1

DATA TRANSFERRED

(X + 1 BYTES + ACKNOWLEDGE)

NOTE: LAST DATA BYTE IS FOLLOWED BY A NACK.

MASTER TO SLAVE

SLAVE TO MASTER

A

XXXXXXXX

XXXXXXXX

A

XXXXXXXX

A

XXXXXXXX

A

P

<DATA (n)> <DATA (n + 1)> <DATA (n + 2)> <DATA (n + X)>

...

Figure 8. Data Read (Write Pointer, Then Read)—Slave Receive and Transmit

I

2

C, 32-Bit, Binary Counter Clock with 64-Bit ID

Advertising