1
\$\begingroup\$

I just bought a ds1621 temperature sensor and started reading its datasheet. I found out that it have 3 pins (A0,A1,A2) which as specified in the datasheet are chip address input.

Can somebody explain to me further the interest of having those pins ?

\$\endgroup\$
3
\$\begingroup\$

Here's what the data sheet says: -

SLAVE ADDRESS A control byte is the first byte received following the START condition from the master device. The control byte consists of a 4-bit control code; for the DS1621, this is set as 1001 binary for read and write operations. The next 3 bits of the control byte are the device select bits (A2, A1, A0). They are used by the master device to select which of eight devices are to be accessed. These bits are in effect the 3 least significant bits of the slave address. The last bit of the control byte (R/W) defines the operation to be performed. When set to a “1” a read operation is selected, when set to a “0” a write operation is selected. Following the START condition the DS1621 monitors the SDA bus checking the device type identifier being transmitted. Upon receiving the 1001 code and appropriate device select bits, the slave device outputs an acknowledge signal on the SDA line.

Basically, if you have several DS1621 devices, you can set the hardware address for each and exclusively read up to 8 devices. The one below is set to have address 000: -

enter image description here

\$\endgroup\$
2
\$\begingroup\$

A little addition to @Andy aka 's answer.

Your device uses I2C, or often called 2-wire serial communication. In this communication protocol the master selects a slave by sending its address to the bus, and the specific slave identifies itself by this address.

Here is a picture of I2C's message frame.

I2C message frame

As you can see there is a Slave Address field which is 7 bit long. This is the address you set as it is described in the datasheet and in @Andy aka 's answer. The first (from MSB) 4 bit are fixed the last 3 could be set with (A0,A1,A2) pins.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.