The default resolution at the power-up is 12-bit. The resolution of the temperature sensor is user-configurable to 9, 10, 11, or 12 bits, corresponding to increments of 0.5☌, 0.25☌, 0.125☌, and 0.0625☌, respectively. Like in DS18b20, we can alter the precision of the temperature. So by modifying the code, we can read any sensor data and write it to EEPROM. If SelectROM( 0) = 40 Then Debug.Print " DS18b20 detected" If SelectROM( 0) = 50 Then Debug.Print " DS2780 detected" Result = TMRom(SHandle, state_buffer( 0), SelectROM( 0))ĭebug.Print " SelectROM(" & i & " ) = " & SelectROM(i) Result = TMNext(SHandle, state_buffer( 0)) ![]() ![]() ![]() If Not (result = 1) Then FindDevices = 1 ' only get the next rom after setup complete Copy Code Public Function FindDevices() As Integer Dim didsetup As Integer, result As Integer, DevId As Integer, i As Integer ReDim ROM( 8) As Integer If SHandle > 0 Then
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |