jayanth.devarayanadurga
Banned
- Joined
- Dec 4, 2012
- Messages
- 4,280
- Helped
- 822
- Reputation
- 1,654
- Reaction score
- 791
- Trophy points
- 1,393
- Location
- Bangalore, India
- Activity points
- 0
Post you circuit. I need to see the DHT11 interface circuit.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 unsigned short ReadByte(){ unsigned short num = 0, t; DataDir = 1; for (i=0; i<8; i++){ while(!Data); Delay_us(40); if(Data) num |= 1<<(7-i); while(Data); } return num; }
RH_Byte1 = ReadByte();
RH_Byte2 = ReadByte();
T_Byte1 = ReadByte();
T_Byte2 = ReadByte();
CheckSum = ReadByte();
// Check for error in Data reception
if (CheckSum == ((RH_Byte1 + RH_Byte2 + T_Byte1 + T_Byte2) & 0xFF))
{
value = (float) (T_Byte1*100.0)+T_Byte2;
//value = (value*1.80)+32.00; // Celcious To Farenhite convershion
value = value;
ch = (value / 1000) % 10;
Lcd_Chr(1,8,48+ch);
ch = (value / 100) % 10;
Lcd_Chr_Cp(48+ch);
Lcd_Chr_CP('.');
ch = (value/ 10)% 10;
Lcd_Chr_CP(48+ch);
Lcd_Chr_Cp(223);
Lcd_Chr_CP('C');
Lcd_Out(1,1,"TEMP = ");
message2[7] = RH_Byte1/10 + 48;
message2[8] = RH_Byte1%10 + 48;
message2[10] = RH_Byte2 + 48;
//Lcd_Cmd(_Lcd_Clear);
Lcd_Out(2, 1, message2);
}
@Mithun_K_Das , I was also doing a project PIC16F877A with 8MHz external X-Ta and temp sensor is DS18B20. In simulation it only shows the temp like 31.0,32.0,33.0 . but in real (breadboard) it shows fractional value like 31.4,32.6 ect. did you try in real hardware?
@Mithun_K_Das , I was also doing a project PIC16F877A with 8MHz external X-Ta and temp sensor is DS18B20. In simulation it only shows the temp like 31.0,32.0,33.0 . but in real (breadboard) it shows fractional value like 31.4,32.6 ect. did you try in real hardware?