Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (1)
MSP430 DS18B20 program
no vote
#include Uint temp_value; Uint temp, A1, A2, A3; / / define variables, display data processing //************************************************************************* / / DS18B20 initialization //************************************************************************* Unsigned char DS18B20_Reset (void) / / initialization and reset { Unsigned char i; DQ_OUT; DQ_CLR; Delay_us (500); / / delay 500uS (480-960) DQ_SET; DQ_IN; Delay_us (80); / / 80uS delay I = DQ_R; Delay_us (500); / / delay 500uS (>480uS) If (I) { Return 0x00; } Else { Return 0x01; } } //************************************************************************* Read a byte / / DS18B20 function //************************************************************************* Unsigned char ds1820_read_byte (void) { Unsigned char i; Unsign
神哥保佑
2016-08-23
0
1
No more~