which TEMP. Sensor for P89V51RD2

Thread Starter

mkbutan

Joined Sep 30, 2008
299
hi
i have 8051 Development Board (P89V51RD2)
pl guide me which Temperature Sensor should i use and how to connect the Sensor with the board or any other Ckt. is required
i have maid the TEMP. Converter program in DEV C++ can this program be use in the μController board or i have to make the other one if yes then how

< Program to Convert F to C >

#include<stdio.h>
#include<conio.h>
void main()
{
float f,c;
printf("\n Enter the TEMP. in F :");
scanf("%f%f",&f,&c);
c=5/9.0*(f-32);
printf("\n The TEMP. in F : %f",f);
printf("\n the TEMP. in C : %f",c);
getch();
}
 
Last edited:

Arm_n_Legs

Joined Mar 7, 2007
186
P89V51RD2 does not have a ADC. You would need to use an ADC. Use the LM35 to measure the temperature, a MCP3002 ADC to do the conversion. Interface the MCP3002 to the P89V51RD2 via the SPI interface.
 
Top