which TEMP. Sensor for P89V51RD2

Discussion in 'Embedded Systems and Microcontrollers' started by mkbutan, Feb 20, 2012.

  1. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    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: Feb 20, 2012
  2. Arm_n_Legs

    Active Member

    Mar 7, 2007
    183
    10
    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.
     
    mkbutan likes this.
Loading...