Temperature measurement with DS18B20 sensor.

Job ID: 31398875

Budget: $30 – $250 USD

Hello,

I need a code to read the temperature from the DS18B20 sensor. It stores the measured value in 2 char variables and converts it to a string.


Processor : PI32MX120F032B

Compiler : C32 v2.02

MPLAB X IDE v5.20

PIC32 crystal : 8 MHz

Input/output pin : RB2

Temperature measurement - resolution : 12 bit


To Do:

1. software for PIC32MX120, which reads the temperature and stores the result in 2 char variables (low_value, hign_value).

2. It then creates the resulting temperature value as a float variable and converts it to a string.

3. The software measures both positive and negative values.

4. The resulting code will be based on a 1-wire library from Microchip.

Use the Delay1us (xx) and DelayMs (unsigned t) functions for the delay function. Attached is my application. You add code to the GetTemperature() function.

Thank you.
Related categories: C Programming Electronics Microcontroller