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.

ADS1243-HT No Response

Other Parts Discussed in Thread: MSP430F2619S-HT, ADS1243-HT

Hi all.

I'm trying to use the ADS1243-HT in my senior design project and I have a few questions about how we have the device currently set up.  Right now I'm sending it the SELFCAL command via SPI from an MSP430F2619S-HT microcontroller, and DRDY is not being pulled low by the ADC, which should indicate that the calibration has completed.  Here's how we setup our hardware.

The DRDY and *CS pins are connected to GPIO pins (interrupt capable for DRDY), and the SPI lines are tied to the outputs of a USCI module in SPI mode.  The ADC is being run at 4.9152MHz (MCLK) to achieve the maximum 30Hz conversion rate, and the serial communications are being clocked at 1.0488MHz (MCLK/4).  

We are only sampling the voltage of two RTD sensors with an output range of 0V to +3.3V.  The reference voltage is +1.65V and any differential pair will be sampled with the negative channel tied to +1.65V to give a fullscale reading at +3.3V and a negative fullscale reading at 0V.

Below is a shot of the output from our MSP430.  

I'll also share some of my code.

void main()
{
	 /***********************************************
	 *	 			    ADC TEST				    *
	 ***********************************************/

	 	 ADC_Calibrate();


	 	 while(!conversion_ready);		// Wait for calibration to complete
	 	 conversion_ready = false;		// Clear DRDY flag

	 	 ADC_Write_Reg(ACR, 0x00, 0x00);

	 	 SamplePair = Select_Fullscale;
	 	 ADC_Set_Mux(SamplePair);

	 	 while(!conversion_ready);		// Wait for calibration to complete
	 	 SamplePair = Select_Ground;
	 	 ADC_Set_Mux(SamplePair);
	 	 test = ADC_Read_Conversion();

	 	 while(!conversion_ready);		// Wait for calibration to complete
	 	 SamplePair = Select_Midscale;
	 	 ADC_Set_Mux(SamplePair);
	 	 test = ADC_Read_Conversion();

	 	 while(!conversion_ready)
	 	 test = ADC_Read_Conversion();
}

uint8_t spiSendByte(uint8_t data)
{
    while (!(SPI_IFG & SPI_TXIFG));		// USCI_B1 TX buffer empty?
    SPI_TXBUF = data;    			// write
    while (!(SPI_IFG & SPI_RXIFG)); 		// wait for transfer to complete
    return(SPI_RXBUF);
}

void ADC_Calibrate()
{
     ADC_CommandByte command = SelfCal;

     P4OUT = 0x40;			         // Set ADC Chip Select Low
     spiSendByte(command);
     P4OUT |= ADC_CS;			         // Set ADC Chip Select High
}

void ADC_Set_Mux(ADC_SelectMux SelectLine)
{
     uint8_t NumRegs = 0;

     switch(SelectLine)
     {
          case Select_IntTemp_Sensor: //Select Internal Temperature Sensor
               ADC_Write_Reg(MUX, NumRegs, 0x12);  // Debug Voltage Pair
               break;
          case Select_ExtTemp_Sensor: //Select External Temperature Sensor
               ADC_Write_Reg(MUX, NumRegs, 0x60);
               break;
          case Select_ExtPress_Sensor: //Select External Pressure Sensor
               ADC_Write_Reg(MUX, NumRegs, 0x80);
               break;
          case Select_OffsetCal_Pair: //Select External Pressure Sensor
               ADC_Write_Reg(MUX, NumRegs, 0x72);
               break;
          case Select_GainCal_Pair: //Select External Pressure Sensor
               ADC_Write_Reg(MUX, NumRegs, 0x32);
               break;
          case Select_Fullscale:
               ADC_Write_Reg(MUX, NumRegs, 0x01);
        	   break;
          case Select_Midscale:
        	   ADC_Write_Reg(MUX, NumRegs, 0x10);
        	   break;
          case Select_Ground:
        	   ADC_Write_Reg(MUX, NumRegs, 0x00);
        	   break;
          default:
               //ERROR CASE
        	  break;
     }
}

void ADC_Write_Reg(ADC_CommandByte address, uint8_t NumRegs, uint8_t data)
{
     int x;
     uint8_t com_and_address;
     ADC_CommandByte command = WriteReg;
     
     com_and_address = command + address;       // combine register address and command
     P4OUT = 0x40;
     spiSendByte(com_and_address);
     spiSendByte(NumRegs);
     
     for(x = 0; x <= NumRegs; x++)
          spiSendByte(data & 0xFF);             // masking all but lower 8 bits
     P4OUT |= ADC_CS;
}

uint32_t ADC_Read_Conversion()
{
     extern bool conversion_ready;
     ADC_CommandByte command = ReadData;
     uint8_t in_data[3];
     uint32_t out_data;
     uint8_t x;

     P4OUT = 0x40;
     spiSendByte(command);
     spiReadFrame(in_data, 3);

     for(x = 0; x < 2; x++)
    	 out_data |= in_data[x]  << (8 * x);

     P4OUT |= ADC_CS;
     conversion_ready = false;			//reset conversion ready flag

     return out_data;
}

  • Luke,



    First, I'd check MCLK to make sure the clock is active, then I'd check ADC_PDWN to make sure that it is high. Those are the first two things to look at.

    Normally to check to see if things are on, I'd look at DRDY to make sure that the device is alive. Since you're not seeing anything on that, let's make a few changes to you're setup. First remove R50 - the pull up isn't necessary, and I'd start without it first. Second I'd power up the board, without any communication to the device (no SCLKs, no DIN). Once that happens, use the logic analyzer to look at the /DRDY line. You should see that /DRDY stays low and gives a small narrow pulse every 33ms. Offhand, I'm not sure how narrow, but it's likely to be only a couple of microseconds so you'll need the use a high resolution on logic analyzer, or if you've got a good scope, that works too. Either of these tools will be your best resource, looking at code doesn't help as much.

    If you can, check to see that your current consumption is where you think it should be. Just make sure that something isn't shorted out.

    I'd also check to see if you can read from or write to the device later, but looking at the /DRDY line is the best, first step. Let me know what happens when you check it out.



    Joseph Wu

  • Mr. Wu,

    We have powered the device up as requested and checked the DRDY lines without ever sending any SCLK pulses or DIN data.  Previous to my first post I had already removed R50 to allow the ADS1243-HT to drive the line on its own.  There is no pulse whatsoever on the DRDY line seen on either our logic analyzer sampling at 24MS/s or on an oscope, it stays at +2.52V.  

    It seems that we've done something to destroy the die.  If this is the case, is there any possible way to order a replacement or 3 directly from TI?  All distributors are out of stock, with a 2-3 week factory lead time.

    Thanks

    Luke

  • Luke,

    I don't have access to any supply of devices other than the distributors (I get my samples the same way you would). I may contact you directly to see if there are any other options.

    In the interim, I want you to make sure that you've checked the PDWN and the XIN line to check that it is getting a clock signal and that it isn't powered down. Then you should take out the device from the board and verify that your board is manufactured correctly by ohming out the board to see that you don't have shorts. You can also power up the board without the device and verify that the voltages are also expected.

    Can you post more of your schematic? Can you supply a photo of the device in the board?

    Joseph Wu

  • Mr Wu,

    Thank you for your assistance, but the issue was, as usual, something simple and my fault.  I had the DRDY pin on the MSP430 set up as an output which was holding the line high.  The DRDY line is now showing the appropriate pulses every 33ms after the SELFCAL command is sent and the calibration completed

    I might return to this thread later today or tomorrow to ask for further assistance as I continue to test the device.

    Thanks,

    Luke

  • Luke,

    Great! It looks like you've got a good handle on the problem. Feel free to post back if you have any other questions.

    Joseph Wu

  • Mr. Wu,

    I've been able to make good progress on using this device properly, but I'm getting some results that I'd like to discuss.  I've been trying to verify that the ADC is converting properly and I'd like some help deciphering the results because I'm relatively new to working with ADCs.  Here is the modified hardware setup with the two voltages I've been sampling.

    So far, my process has been

    Issue SELFCAL

    wait for DRDY to drop

    -------------------------- Main Loop ----------------------------

    Set MUX register to 0x60 (3.15V - 1.65V differential)

    Read back MUX register to verify successful write

    Read Conversion Results

    wait for DRDy to drop

    Set MUX register to 0x70 (.25V - 1.65V differential)

    Read back MUX register to verify successful write

    Read Conversion Results

    ----------------------- end Main Loop -----------------------------

    From my understanding, I want to set the MUX immediately after DRDY drops low to minimize settling error, and the conversion results I read directly after setting the MUX apply to the differential pair set on the previous DRDY pulse.  Please confirm.

    I was reading the MUX directly after setting it to make sure it was set correctly. Once I verify correct operation I will not be doing this, but I noticed some disparity between reads.  Sometimes I switch the MUX pair and the register read immediately after this write shows that the MUX register is still set for the previous differential pair.  Is there a wait time between writing and reading other than the 4*tosc periods listed in the Timing specification?  I am meeting that specification with ~12us between commands.

    The conversion results seem to be accurate.  The 3.15V readings are all around 0x72XXXX - 0x74XXXX and the 0.25V readings are around 0x92XXXX - 0x94XXXX.  This matches my expected positive negative shift when using a reference voltage  and negative channel of +1.65V.

    If you have the Saleae Logic 1.1.15 software I can upload my logic captures for you to directly view.

  • Luke,


    I would do this a little differently.

    --- main loop ---

    Set the MUX register

    Do a DSYNC command

    Wait for DRDY to drop

    Read conversion results

    Set the next mux setting

    Do a DSYNC commandm, Wait for DRDY to drop

    Read conversion result

    --- end main loop ---

    The DRDY is supposed to indicate that a conversion is done. If you set the mux register right after the DRDY pulse goes low, you still get some data that incorporates the last mux setting. By issuing the DSYNC this restarts the filter so that the conversion starts fresh.

    Try the read this way and let me know if it works for you.

    If you want upload the captures, I have a Saleae Logic 8. I think I'm running a newer beta version of the software though. I'm not sure I'll have a lot of time to review it, but I'll try.



    Joseph Wu