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.

Regarding ADC data read

Other Parts Discussed in Thread: ADS1230

Dear Sir,

         I am using ADS1230 for my weighing scale application. I was able to read the data properly, but when I switch ON/OFF my nearby electrical unit/instrument, the ADC hangs, not the uC. ADC PDWN is controlled from uC.

         A brief about my S/W flow;

  ADC Data pin connected to INTERRUPT PIN, Falling edge of DATA, points to ISR, where, after a small delay, I start reading all the 20 bits and then give one clk pulse with DATA pin high(20 bit format). Come out from ISR, display & wait for ADC reading.

    But when some external electrical switching happens, the reading becomes the maximum(0x7FFFF) and at this moment, I monitored (DSO) the SCK & SDATA pins, where the falling edge timing signal on DATA pin is more.  i-e., the DATA pin going low doesn’t happens at 100ms(10SPS), it happens even much faster at 10-25ms. As the DATA pin falling edge increases, SCLK follows the same signal pattern of DATA pin.

       Kindly reply me, how to handle this problem. I don’t want the ADC to be in single conversion mode by entering into StandBy mode. I want to read the ADC in its fly (continuous conversion) i;e through interrupt method. My code:

   if(INTCONbits.INT0IF)  //BUSY

      {                            

                        TOTAL_COUNTS_MAIN = full_byte_read();

                          second_byte_read2();             

                         Bits.eocf = 1;    //Indication to main routine for end of conversion.                                    

                        INTCONbits.INT0IF = 0;

      }

 

/*****************************************************************************************************************

unsigned long int full_byte_read(void)

{ 

  valq = 0;

  q=0x80000;

  delay(10); 

 

  for (q=0x80000;q>0;q/=2)             //shift bit for masking

  {

    CLK = 1;

    { _asm nop _endasm};

    { _asm nop _endasm};

    { _asm nop _endasm};                      

    CLK = 0;      

    { _asm nop _endasm};

    { _asm nop _endasm};

    { _asm nop _endasm};

            if (BUSY) valq=(valq | q);        //read bit 

   { _asm nop _endasm};

    { _asm nop _endasm};

    { _asm nop _endasm};          

  }

  return valq;

}

//*****************************************************************************************************************

 

  Doubt 2:

        Also reply me, what happens to ADC, if there is an abrupt change in VCC, at PDWN controlled by uC?

           Jayaraj.A

  • Jayaraj,

    It sounds to me like your system is very unstable.  Is your prototype mounted on a printed circuit board, on using some other method like a solderless breadboard?  You must have clean power sources and adequately bypassed.  From your description is sounds like there may have been a power transient.  Make sure you have a good ground for the ADS1230, a clean VREF and that all input pins for the ADS1230 go somewhere.  Please post a schematic (and board layout if there is one) so that I can make some better suggestions to help make your system work as desired.

    Avoid any power or signal glitches.  This can place you in some unknown state that may require a device reset.

    Best regards,

    Bob B

  • Dear Sir,

             thanks for your reply. I accept that the development was not done on a regular PCB. It was assembled on a general purpose board. I was able to see (DSO) the (+5V)power transient. Considering this condition as the worst case, reply me  the precautionary measurements, both in H/W & S/W, for my upcoming regular PCB. My schematic design & board layout follows, your reference design for ADS1230(evaluation baord), except the +5V, which I am using the 7805 with 9V AC step down transformer.

               Regarding ADS1230 unknown state:

                            I had removed my uC interfaced with the ADC and grounded the CLOCK pin of ADC and then powered & watched the DATA pin on DSO, where the high to low pulse was coming at the proper interval of 100ms(10SPS). At this condition, I simulated a abnormal condition of switching nearby high voltage AC. Power transient happens and the ADC DATA pin goes to abnormal condition, i-e., output data(high to low pulse) at much faster rate compared to 100ms. What is this condition and how to sense & prevent this sort of abnormal condition to ADC and then to reset it?

                        In brief: How the S/W flow should be, to reset, to avoid the abnormal activity of ADS1230? The code should expect DATA pulse at the interval of 100ms, if it is early or late, reset the ADC. Because the uC tolerates the power glitch and works, thinking that ADC is in the fine state. is it right?

                    Kindly reply me the precautionary steps in terms of both S/W & H/W when the ADC gets into unknown state.

    Jayaraj.A

  • Jayaraj,

    Apparently you tried to post a picture of your schematic and/or layout, but it did not come through.  In case you didn't do this, you need to use the 'Insert Image' icon to add your pictures.  It is hard to tell you what to do if I don't have a baseline to work from.  Here are some things to consider.

    First of all, you need to eliminate the power transient situation.  These transients will cause unknown states, which can cause your devices to fail, and most likely will only recover if you do a power reset (if they recover at all).  You mention the AC step down to 9V.  Are you using a half-wave bridge or a full-wave bridge rectifier?  Full-wave is much better.  Do you have a very large cap (1000s or even 10000s of uF) to filter the output of the rectifier.  The large cap will also help clean up switching transients.  You  may also want to add an inductor on the supply prior to the 7805, as well as a bypass cap (0.1uF).

    You also need to have a very good ground.  This means not a bunch of traces, but a ground plane.

    As far as the software is concerned, there is no way to truly know the state of the ADS1230 if there is some transient that has changed the operation.  You really need to do a power reset in this case.  So, as I mentioned earlier, eliminate the transient, that not only gets in the supply, but also gets into any pin you have pulled high or low to the supply.  Remember that there are absolute maximum for the inputs to the device, and if there is a transient that violates those maximums you will damage the device.

    Best regards,

    Bob B