Blackboard's Temperature Sensor

Background information for Blackboard's NXP LM75BDP Temperature Sensor

412

The LM75B is a I2C connected Temperature sensor. On the Blackboard it is connected to the Zynq’s I2C1 module. The device supports a configurable I2C address, via 3 pins which define the lowest 3 bits of the device’s I2C Address. On the Blackboard the device is always set to the address 7b1001000.

LM75B Registers

The device has 4 registers, the register is accessed by an I2C transaction is controlled by a pointer value. During an I2C write, the first byte sent will set the value of the pointer register. At reset the pointer register is set to 2b00, which is the Temperature register. Thus, no writes are required if only the temperature data is being accessed.

The register accessed through each pointer value are detailed below:

  • 2b00: Temperature Data
  • 2b01: Configuration Register
  • 2b10: Hysteresis Register
  • 2b11: Overtemp Threshold Register

For a complete explanation of the registers refer to the LM75B’s data sheet.

Reading Temperature Data

If the device has been reset, and the pointer register not modified yet, any reads will return temperature data. It can be accessed in 2-bytes or 1-byte. If one byte is read, the temperature data will have a resolution of 1 degree Celsius. If two bytes are read, the data will have a resolution of 0.125 degrees Celsius. The data read will be in two’s complement. For a 2-byte read, only the 11 MSb will have temperature data, the lowest 5 bits will read zero.

The data read is in 11-bit two’s complement (if 2 bytes are read). The range of the Temperature data goes from -55 degrees to 125 degrees. A reading of 11b00000000000 (decimal 0) corresponds to 0 degrees, a reading of 11b11001001000 (decimal -440) is -55 degrees celsius (the maxium lower bound), and a reading of 11b01111101000 (decimal 1000) is 125 degrees celsius (the upper bound).

Complete details for communicating with the sensor via I2C as well as how to interpret data readings can be found in the module’s data sheet: LM75B Data Sheet .