English
Language : 

DS1683_12 Datasheet, PDF (18/21 Pages) Maxim Integrated Products – Total-Elapsed-Time and Event Recorder with Alarm
DS1683
Total-Elapsed-Time and Event Recorder with Alarm
MSB
LSB
1 1 0 1 0 1 1 R/W
SLAVE ADDRESS
READ/WRITE BIT
Figure 8. DS1683 I2C Slave Address
data. A NACK is used to terminate a read sequence or
as an indication that the device is not receiving data.
Byte Write: A byte write consists of 8 bits of information
transferred from the master to the slave (most significant
bit first) plus a 1-bit acknowledgement from the slave
to the master. The 8 bits transmitted by the master
are done according to the bit write definition and the
acknowledgement is read using the bit read definition.
Byte Read: A byte read is an 8-bit information transfer
from the slave to the master plus a 1-bit ACK or NACK
from the master to the slave. The 8 bits of information
that are transferred (most significant bit first) from the
slave to the master are read by the master using the bit
read definition, and the master transmits an ACK using
the bit write definition to receive additional data bytes.
The master must NACK the last byte read to terminate
communication so the slave returns control of SDA to
the master.
Slave Address Byte: Each slave on the I2C bus
responds to a slave address byte sent immediately
following a START condition. The slave address byte
contains the slave address in the most significant 7 bits
and the R/W bit in the least significant bit.
The DS1683’s slave address is D6h (1101 011R/W,
where R/W is 0). When the R/W bit is 0 (such as in D6h),
the master is indicating it will write data to the slave. If
R/W is set to a 1 (D7h in this case), the master is indicat-
ing it wants to read from the slave. See Figure 8.
If an incorrect (nonmatching) slave address is written,
the DS1683 assumes the master is communicating with
another I2C device and ignores the communication
until the next START condition is sent.
Memory Address: During an I2C write operation to the
DS1683, the master must transmit a memory address
to identify the memory location where the slave is to
store the data. The memory address is always the sec-
ond byte transmitted during a write operation following
the slave address byte.
Maxim Integrated
I2C Communication
Writing a Single Byte to a Slave: The master must
generate a START condition, write the slave address
byte (R/W = 0), write the memory address, write the
byte of data, and generate a STOP condition. The mas-
ter must read the slave’s acknowledgement during all
byte write operations.
When writing to the DS1683, EEPROM is written fol-
lowing the STOP condition at the end of the write
command. To change the setting without changing the
EEPROM, terminate the write with a repeated START
condition before the next STOP condition occurs.
Using a repeated START condition prevents the tW
delay required for the EEPROM write cycle to finish.
For a write command, data is transferred after receiv-
ing a STOP.
Writing Multiple Bytes to a Slave: To write multiple
bytes to a slave, the master generates a START condi-
tion, writes the slave address byte (R/W = 0), writes the
memory address, writes up to 8 data bytes, and gener-
ates a STOP condition. The DS1683 writes 1 to 8 bytes
(one page or row) with a single write transaction. This is
internally controlled by an address counter that allows
data to be written to consecutive addresses without
transmitting a memory address before each data byte
is sent. The address counter limits the write to one
8-byte page (one row of the memory map). Attempts
to write to additional pages of memory without sending
a STOP condition between pages result in the address
counter wrapping around to the beginning of the pres-
ent row. For example, a 3-byte write starts at address
06h and writes 3 data bytes (11h, 22h, and 33h) to
three “consecutive” addresses. The result is that
addresses 06h and 07h would contain 11h and 22h,
respectively, and the third data byte, 33h, would be
written to address 00h. To prevent address wrapping
from occurring, the master must send a STOP condi-
tion at the end of the page, then wait for the bus-free
or EEPROM write time to elapse. Then the master can
generate a new START condition and write the slave
address byte (R/W = 0) and the first memory address
of the next memory row before continuing to write data.
Acknowledge Polling: Any time a EEPROM byte is
written, the DS1683 requires the EEPROM write time
(tW) after the STOP condition to write the contents of
the byte to EEPROM. During the EEPROM write time,
the device does not acknowledge its slave address
because it is busy. It is possible to take advantage
  18