This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

lmp90100 adc read program want to know how to set vrefrence....

Other Parts Discussed in Thread: LMP90100

helloo..,

              I want to know where i am going wrong i am able to do spi communication with pic 18f45k22 and lmp90100...i am able to operate gpio ports n reset register in lmp90100 but nw i am trying to configure adc i am nt able to do...as i saw in the hardware VINP1 ,VINN1 pins are also nt having any voltage...it means refrence voltage is not set...can u advice something how to set vref for lmp90100....urgent reply needed...plzzz

  • Hi Mrinalini,

    Can you describe your hardware for us and possibly post a screen capture of your SPI communication interface?

  • WE HAVE TEXAS LMP90100 EVALUATION BOARD ....WE CONNECTED THE JUMPER SETTINGS AS ITS GIVEN FOR 3-WIRE RTD ON PAGE NO. 15 OF DATASHEET

    User’s Guide for the LMP90100 Evaluation Board with Sensor
    AFE Software

    (1604987.PDF) IN SPITE WE HAVE GIVEN EXT. POWER SUPPLY OF 5V at VIO_EXT(J1) and VA_EXT(J3). GND  at J2.

    PIC 18F4523 CONECTION TO LMP90100 

    PIN 24(RC5/SDO)-SDI

     pin 23(RC4/SDI/SDA)-SD0_DRDYB

    pin 18(RC3/SCK/SCL)-SCLK

    pin 22(RD3/PSP3)-CSB

    -GND

    These are the connections.

    i have a question to ask

    Do there need to configure CHx_SCAL_OFFSET and CHx_SCAL_GAIN registers for channel 0 to read adc.

    and another one 

     we used channel 0 to read adc as RTD connected at channel 0, should we configure evry channel in the program or only channel 0 is sufficient.


  • #include "D:\Pen Drive Data\Important Data\projects\LM90100\Program\Macros.c"
    #include "D:\Pen Drive Data\Important Data\projects\LM90100\Program\Variables.c"
    #include "D:\Pen Drive Data\Important Data\projects\LM90100\Program\General_Functions_v0.0.1.c"
    #include "D:\Pen Drive Data\Important Data\projects\LM90100\Program\Globle_Functions_v0.0.1.c"
    #include "D:\Pen Drive Data\Important Data\projects\LM90100\Program\LM90100_Macros.c"
    #include "D:\Pen Drive Data\Important Data\projects\LM90100\Program\Spi_Functions.c"
    #include "D:\Pen Drive Data\Important Data\projects\LM90100\Program\LM90100_Functions_v0.1.c"
    void main()
    {
    unsigned char Cont=0,port_data=0;
    MCU_Init();
    Int_Lcoal_Variable=0;
    Lcd_Out(2,1,"Testing");
    Spi_Init();
    Delay_100ms();
    LM_90100_Init();
    //Power Config
    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_PWRCN_REG,0); //Active Mode

    //LM_90100_Spi_Writing_Address_Data(TI_LMP90100_CH_STS_REG,LM90100_Read_Ptr,1,SPI_READ); //Power Mode Control and Status
    //AUXCN
    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_ADC_AUXCN_REG,0x0A); //Config AuxChannel

    //Channel Config
    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_CH0_CONFIG_REG,0x41); //Config Channel Zero
    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_CH1_CONFIG_REG,0x41); //Config Channel One

    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_BGCALCN_REG,0x00); //Confif TI_LMP90100_BGCALCN_REG

    //Channel Input
    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_CH0_INPUTCN_REG,0x41); //Confif TI_LMP90100_CH0_INPUTCN_REG
    //LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_CH1_INPUTCN_REG,0x41);

    //
    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_ADC_RESTART_REG,1); //REset the ADC Register
    // LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_CH_SCAN_REG,0x70);
    lcd_cmd(_LCD_CLEAR);

    while(1)
    {
    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_CH_SCAN_REG,0x00);
    LM_90100_Spi_Writing_Address_Data(TI_LMP90100_CH_STS_REG,LM90100_Read_Ptr,1,SPI_READ);//Storing the CH_STS_REG Value to the LM90100_Read_Ptr
    if(*LM90100_Read_Ptr<0xff) //Checking the CH_STS_REG Status
    {

    LM_90100_Spi_Writing_Address_Data(TI_LMP90100_ADC_DOUT2_REG,LM90100_Read_Ptr,3,SPI_READ);
    Display_Int2Float(1,1,*LM90100_Read_Ptr,_One_Degree,0); ///Reading the Upper register value
    Display_Int2Float(2,1,*(LM90100_Read_Ptr+1),_One_Degree,0); ///Reading the Middle register value
    Display_Int2Float(2,10,*(LM90100_Read_Ptr+2),_One_Degree,0); ///Reading the Lower register value
    Display_Int2Float(1,10,Cont++,_One_Degree,0); //Just to know where the programm is comming to this while loop or not.
    port_data=~port_data;
    LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_GPIO_DAT_REG,port_data); // Complimenting the GPIO ports this is also WORKING we had testing using the multimeter.
    //LM90100_Spi_Read_Write_Single_Value(TI_LMP90100_ADC_RESTART_REG,1);
    Delay_ms(1000);
    }
    }
    }

  • Hi mrinalini,

    You need not have to configure the CH_SCALE_xx registers.

    1.Make sure you have configured the CHO VinP and VinN to measure signals from the intended Pins.
    2.Make sure you are in the proper Scan Mode(CH_SCAN: Channel Scan Mode (Address 0x1F)).
    3.make sure you have configured the right reference.

    Regards,
    Murali 

     

  • HI,

    i had checked all the things they are correct help me out with the values of ADC_DOUTH=0x54

                                                                                                                                          ADC_DOUTM=0xE5

                                                                                                                                         ADC_DOUTL=0xA4

    its value is same for any value of temperature y so....??

    plz clear thiz point of mine as soon as possible ....plzzz...reply soon