# mcp9800

mcp9800

Author | Eur van Andel, eur@fiwihex.nl Copyright © 2010
Adapted-by | William Welch
Compiler | =2.4n

Description

    this library works with the MCP9800 temperature sensor from microchip
    The MCP9800 can do 9 to 12 bit temperature measurement resolution
    in the 12bit mode, the LSb represents 1/16ºC
    only 12 bit routines are given here

Dependencies

No dependency found

## Summary

### Global variables/contants

- `const byte mcp9800_addr = 0b1001_0000`

### Procedures

### Functions

- `mcp9800_centicelsius() return sword`
- `mcp9800_set_12_bits_temperature() return bit`
- `mcp9800_12bit() return sword`
- `mcp9800_celsius() return sbyte`

## API details

### Global variables/contants

- `const byte mcp9800_addr = 0b1001_0000`

      read/write is done by i2c library

### Procedures

### Functions

- `mcp9800_centicelsius() return sword`

      temperature, in degrees Celsius X 100, as a signed-word

- `mcp9800_set_12_bits_temperature() return bit`

      initialize the mcp9800 for 12-bit samples

- `mcp9800_12bit() return sword`

      return Celsius temperature in this format: Smmmmmmmmmmm.ffff

- `mcp9800_celsius() return sbyte`

      temperature, in degrees Celsius as a signed-byte

## Related samples

No sample found