Why can t my ds18b20 program read the temperature? Under the guidance of the heroes 5

Updated on society 2024-05-20
3 answers
  1. Anonymous users2024-02-11

    The DS18B20 displays a fixed value and remains unchanged when heated.

    The DS18B20 is a digital temperature sensor, and if it shows a fixed value and does not change after heating, there may be several reasons:1Connection error:

    The DS18B20 requires three pins to connect, one of which is for power supply, and the other two pins are for the data line and ground wire. Please check if the connection is correct. 2.

    Damaged sensor slippery baggage: If the DS18B20 sensor is damaged, it may result in inaccurate readings of temperature data or a fixed value at all times. You can try to replace it with another sensor for delayed testing.

    3.Program errors: If the program is incorrect, it can cause the temperature data to be read inaccurately or to remain fixed all the time.

    It is possible to check if the program is correct. 4.The ambient temperature does not change:

    If the ambient temperature remains constant, the temperature data read by the DS18B20 sensor will remain the same. The sensor can be moved to another temperature environment for testing. Hopefully, this information will be helpful to you.

  2. Anonymous users2024-02-10

    The DS18B20 displays a fixed value and remains unchanged when heated.

    If the DS18B20 temperature sensor shows a fixed value and the temperature value does not change after heating, there may be several reasons:1Connection error:

    Check whether the DS18B20 sensor is connected correctly, including whether the pins and power supply are in good contact. 2.Software Issues:

    Check that the program using the cheater is correct, including the correct pin definitions, library files, etc. 3.Sensor failure:

    If the sensor itself fails, the temperature data may not be readable or read inaccurately. It is recommended to replace the sensor with a new one for testing. 4.

    Ambient temperature is too high: If the temperature of the source environment in which the sensor is located is too high, it may affect the operation of the sensor and cause the temperature reading to be incorrect. It is recommended that the sensor be tested at a suitable temperature.

    In short, if the DS18B20 temperature attitude sensor shows a fixed value and the temperature value remains unchanged after heating, you need to check whether the connection is correct, whether the software program is correct, whether the sensor is faulty, whether the ambient temperature is too high, etc., to find the problem, and deal with it accordingly.

  3. Anonymous users2024-02-09

    1: The first underlined part is about the delay function, why is it so delayed? Does the data sheet say it?

    I deliberately read the English manual, the 10-bit conversion time is, the 12-bit conversion time is 750ms, and the delay time you see is not necessarily right.

    2: The second underlined part, I don't understand it here, especially the last sentence multiplied can be accurate to ?

    The purpose of high&0x0f is to preserve valid bits.

    The purpose of temp<<=8 is to shift eight bits to the left to vacate the low bytes.

    temp |= low is the purpose of multiplying the integer number with the low byte to get the actual Celsius value.

    Multiplying is not accurate to the fact that this is 18b20 resolution, and its accuracy is only 1 degree Celsius.

Related questions
4 answers2024-05-20

The display temperature part is done, which means that you have completed the reading of the DS1820. In this case, you set a value in the program for comparison, greater than or less than a certain value output. >>>More

6 answers2024-05-20

Here is the C51 procedure for DS18B20:

Initialize 18b20 >>>More

12 answers2024-05-20

Whether or not to obey our parents actually depends on what issues to make decisions After all, we are still young, and we are really not mature enough to think about it, and parents will think about it in the long run, but at this age, there are a few people who really understand that many things have been going on for a long time, and they feel that they should really listen to their parents at that time, and they regret it. Specific analysis of specific problems, for example, what you said This problem is very realistic, and you can talk to them about it Honestly, what you study in college is really related to your future career You think you don't like this major But your parents must learn that they will find you a job in the future, and you have to analyze for yourself whether you like the job they have found for you, and how you will move forward in the future.

7 answers2024-05-20

Enter the following command in the command prompt:

for %1 in (%windir%\system32\*.dll) do /s %1 >>>More

6 answers2024-05-20

There's a virus in your computer! I heard that it's a gray pigeon.,Use Rising card.,Antivirus software can't kill it.,I used to have this situation on my computer.,A lot of processes.,You can't kill it with antivirus software.,Then I thought of a compromise method.,It's to observe that these are users for the system.,So just find this file.,Just cancel all the checks in front of the system user permissions in the permissions.。 I don't know if other friends have a better way!