Menu

MCP9808 High Accuracy Temperature Display on PC Terminal using PIC16F88 as I2C Master

Jon Nelson
2022-06-10
2022-06-19
  • Jon Nelson

    Jon Nelson - 2022-06-10

    Microchip Technology Inc.’s MCP9808 digital temperature sensor outputs temperatures between -20°C and +100°C with ±0.25°C typical accuracy.
    https://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
    MCP9808 MANUAL
    Often sold on a breakout board, only 4 pins (5v, 0v, SDA and SCL) are used here to connect to the PIC16F88 operating as an I2C bus master.

    i2csoftwarediscovery_to_terminal_16f88.gcb (attached) was used to discover the MCP9808 I2C address. This test program uses 48 (30 hex) with address pins untouched (default settings).
    MCP9808degPIC16F88.gcb reads the temperature from the MCP9808 and displays it every few seconds onto RS-485 or RS-232 serial connected to a PC terminal.
    After startup a few tests of the display mechanics are shown before MCP980 readings are displayed.
    Typical test output:

    Read MCP9808 Temperature sensor
    0 3 1 0.1 degC
    0 128 80 8.0 degC
    6 56 995 99.5 degC
    1 147 251 25.1 degC
    1 146 251 25.1 degC
    1 147 251 25.1 degC
    
     

    Last edit: Jon Nelson 2022-06-11
  • stan cartwright

    stan cartwright - 2022-06-11

    Thanks for sharing. Unfamiliar device, I'll look it up.

     
    😄
    2

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.