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.

connecting two 3-wire RTDs to ADS1247

Other Parts Discussed in Thread: ADS1247, ADS1248, TPS3836

hello,

I would want to use the ADS1247 with two 3-wire RTDs (100 ohms).

Is it possible?

 

 

Best regards.

  • Hi Alessandro,

    Yes, using the ADS1247, you may connect up to two  3-wire RTDs.

    Using the ADS1248, you may connect up to four 3-Wire RTD's.

    Please find attached a slide that shows an example with the RCOMP resistor.  Also below is a link to an application note covering in detail  the ADS1247/8 performing temperature measurements using RTD's and thermocouples.

    http://www.ti.com/lit/an/sbaa180/sbaa180.pdf

     Thank you and Best Regards,

    Luis

    5417.ads1247_3wire.pdf

  • Hi Luis,

    I am using the configuration that you suggest. I develop a board with ADS1247 and connected it to MCU.

    I want to measure the temperature from two 3-wire RTDs each x minutes.

    The pins connection  for the two 3-wire RTDs are:

    START always high

    CS always low

    RESET always high

    AIN0 & AIN1 for a 3-wire RTD

    AIN2 & AIN3 for another 3-wire RTD

    REFP0 for the third wire of both 3-wire RTDs

    I use external ref:

    Rbias 1Khom

    Initialization for 3-wire RTD number 1 :

    IMUX0: 0x01 (AIN0 & AIN1)

    VBIAS: 0x00

    MUX1: 0x60 (INTERNAL_REF_ON_IF_CONVERSION_ON + DEFAULT_REF0_INPUT_PAIR + DEFAULT_NORMAL_OPERATION)

    SYS0: 0x09 (DEFAULT_GAIN_OF_1 + DATA_RATE_OF_1000SPS)

    IDAC0: 0x8E (DATA_OUT_DATA_READY + IDAC_1000uA)

    IDAC1: 0x01 (IDAC1_AIN0 + IDAC2_AIN1)

    Initialization for 3-wire RTD number 2 :

    IMUX0: 0x13 (AIN2 & AIN3)

    VBIAS: 0x00

    MUX1: 0x60 (INTERNAL_REF_ON_IF_CONVERSION_ON + DEFAULT_REF0_INPUT_PAIR + DEFAULT_NORMAL_OPERATION)

    SYS0: 0x09 (DEFAULT_GAIN_OF_1 + DATA_RATE_OF_1000SPS)

    IDAC0: 0x8E (DATA_OUT_DATA_READY + IDAC_1000uA)

    IDAC1: 0x23 (IDAC1_AIN2 + IDAC2_AIN3)

    This is my instruction sequence:

    1) open SPI

    2)Initialization

    3)Self offset calibration (command 0x62)

    4) wait for 10 ms

    5) read all register

    6) Stop read data continuously (command 0x16)

    7)write three times 0xFF

    8)Read Data Manually (command 0x13)

    9) wait for 10ms

    10) Read 24bit Data

    On first run the temperature value is correct.

    On second run I put:

    - START low

    - wait for 10 ms

    - START high

    - Read Data Manually (command 0x13)

    - wait for 10ms

    - Read 24bit Data

    - But the value is not correct.

    This is the first problem, the second is when I switch on second 3-wire RTD.

    Can you help me to understand what is wring?

    Alessandro

  • Hello Alessandro,

    The configuration settings appear to be correct for the most part, only a few questions:

    - The SYS0 register must be set to 0x08 for data rate or 1000SPS: SYS0: 0x08 (DEFAULT_GAIN_OF_1 + DATA_RATE_OF_1000SPS)

    - After the self offset calibration, the user must wait more than16.14ms when the device is set to 1000SPS, or more than 8.07ms when the device is set to 2000SPS before issuing any commands.  Table 14 on page 32 shows the required calibration time versus data rate.

    - On the second run, most likely the issue is that after re-asserting the START pin high, the user must wait the required conversion time depending on data rate before issuing the RDATA command; otherwise you may read the previous conversion result.   On the settings above (MUX1 register REFCON1:0 are set to '10'); the internal reference is being turn off when the START pin is taken low and the internal reference must be allowed time to settle when setting the START pin high.  The settling of the internal reference is dependent on the external capacitor connected to the VREFOUT pin; Table 10 on page 29 shows the internal reference settling time versus external capacitor. For example, a suggested sequence after setting START high may be

    - START high

    - Wait enough time for the internal reference to settle, allow the analog input signals to settle; if analog RC filter is used, allow the external filter to settle.

    - Wait for the required conversion time for conversion to complete ~1ms for 1000 SPS; you may also monitor the falling edge of the DRDY signal

    - Send RDATA command (x13h)

    - Send 24 SCLK's to read the conversion results.

    Please let me know if the issue persist, if you have a detailed schematic, we could also review it.

    Thank you and Best Regards,

    Luis

  • Hi Luis,

    I am using TI ADS1247EVM evaluation board and I noted that  I can not control directly START pin on ADS1247. It is connected to U3 and it keeps START pin always high.

    I would use START to perform a new conversion but I don't know how to put START low by using ADS1247EVM board.

    Do you know how I can do that?

    Best regards,

    Alessandro

  • Hi Alessandro,

    When using the ADS1247EVM as a stand alone board (without the MMB3 motherboard); the START pin is pulled high by a weak 100k pull up resistor; and the PCA9535RGE (U3) PO0 (START) and PO1 (RESET) are by default configured as inputs (they should  tri-state).  You should be able to control the START pin externally.

    The RESET pin from the ADS1247 device is wired through a TPS3836 (U12) supervisor with a 200ms delay time.  When applying power, (or toggling the RESET) the TPS3836 supervisor will have a delay of 200ms before asserting RESET high.  You will need to remove the supervisor (U12) if you do not want to have this delay.

    Best Regards,

    Luis

    .

  • Hi Luis,

    thank you for the support. I am using ADS1247EVM as stand alone board with two 3-wire RTDs (Pt100). One connected to AIN0-AIN1 and another to AIN2-AIN3.

    Are there some constrains when I switch from AIN0-AIN1 to AIN2-AIN3  (waiting time, etc)?

    I use these instructions to switch to AIN2-AIN3:
             WRITE_MUX0_REGISTER 0x13
            WRITE_MUX1_REGISTER 0x60
            WRITE_SYS0_REGISTER 0x08
             WRITE_IDAC0_REGISTER 0x6E
            WRITE_IDAC1_REGISTER 0X23

    Best regards,

    Alessandro
                

  • Hello Alessandro,

    The MUX1 register controls the internal reference; if the internal reference is being turned on; you will need to allow the internal reference to settle. Table 10, p29 of the datasheet provides the typical settling times as a function of the VREFOUT external capacitor. 

    There is a section in the datasheet "Channel Cycling and Overload Recovery" (Please refer to Page 34 of the datasheet)...  If you are changing channels and changing the PGA Gain and/or Data Rate settings (writing both the MUX0 and SYS0 register); It is important to avoid overloading the PGA.  It is recommended that the writing of the SYS0 register and MUX0 register is split into two separate communications performing the change of the SYS0 register before the change of the MUX0 register; otherwise, an overload may occur resulting in intermittent or incorrect readings.

    In your instructions above; you will need to send one command to set the SYS0 register first and then a second separate command to change the MUX0 register.

    Thank you and Best Regards,

    Luis

  • Hi Luis,

    In order to control the internal reference I use MUX1=0x60 0=> Internal reference is on when a conversion is in progress and shuts down when the device receives a shutdown opcode or the START pin taken low. So

    I program MUX1 only at beginning. Is it better to use ON and OFF commands for Internal Reference?

    I report the complete sequence that I use to measure temp by using two 3-wire RTDs(RTD1 and RTD2) connected to ADS1247EVM. RTD1 is connected AIN2-AIN3 (room temperature) and AIN0-AIN1 (-4°C).

    - START low

    - RESET high

    - delay(10)

    - START high

    - INITIALIZING SPI

    - delay (10)

    - WRITE MUX0 --> 0x13 (AIN_POS, AIN3_NEG)

    - WRITE VBIAS --> 0x00

    - WRITE MUX1 --> 0x60

    - WRITE SYS0 --> 0x08

    - WRITE IDAC0 --> 0x06   (IDAC_1000uA)

    - WRITE IDAC1 --> 0x23  (IDAC1_AIN2,   IDAC2_AIN3)

    - delay(25)

    - SELF OFFSET CALIBRATION

    - delay (20)

    - Read all registers. These are the values:

    MUX0 = 0x13

    VBIAS = 0x00

    MUX1 = 0x60

    SYS0 = 0x08

    OFC0 = 0x00

    OFC1  = 0x00

    OFC2 = 0x00

    FSC0 = 0xC0

    FSC1 = 0x03

    FSC2 = 0x40

    IDAC0 = 0x6E

    IDAC1 = 0x23

    GPIOCFG = 0x00

    GPIODIR = 0x00

    GPIODAT = 0x00

    - WRITE SDATAC 0x16

    - WRITE 0xFF

    - WRITE 0xFF

    - WRITE 0xFF

    - WRITE RDATA 0x13

    - delay(10)

    -  Read_24bit_Data(&RTD_Voltage1); (I read wrong value)

    - delay(5)

    - START low

    - delay(5)

    - START high

    - delay(30)

    - WRITE MUX0 0x01 (AIN0_POS, AIN1_ NEG)

    - WRITE IDAC1 0x01 (IDAC1_AIN0  IDAC2_AIN1)

    - delay(25)

    - Read all registers:

    MUX0 = 0x01

    VBIAS = 0x00

    MUX1 = 0x60

    SYS0 = 0x00

    OFC0 = 0x00

    OFC1  = 0x00

    OFC2 = 0x00

    FSC0 = 0xC0

    FSC1 = 0x03

    FSC2 = 0x40

    IDAC0 = 0x60

    IDAC1 = 0x01

    GPIOCFG = 0x00

    GPIODIR = 0x00

    GPIODAT = 0x00

    - WRITE SDATAC 0x16 (Can I remove??)

    - WRITE 0xFF  (Can I remove??)

    - WRITE 0xFF (Can I remove??)

    - WRITE 0xFF (Can I remove??)

    - WRITE RDATA 0x13

    - delay(10)

    -  Read_24bit_Data(&RTD_Voltage2); (I read wrong value)

    - CLOSE SPI

    - START low

    Can you check if my sequence is correct?

    Best regards,

    Alessandro

  • Hi Luis,

    I forgot to add that ADS1247EVM uses a  capacitor  C17of 10uF connected to PIN7 (VREFOUT).

    From table 11 pag 29 that means a settling time of 22ms.

  • Hi Alessandro,

    - The RESET pin from the ADS1247 device is wired through a TPS3836 (U12) supervisor with a 200ms delay time.  When applying power, (or toggling the RESET) the TPS3836 supervisor will have a delay of 200ms before asserting RESET high.  In the sequence above, ensure you wait enough time for RESET to be asserted high.  You will need to remove the supervisor (U12) if you do not want this delay. (if you have remove this, please disregard this note).

    - Regarding the Reference settings, with MUX1: 0x60 (INTERNAL_REF_ON_IF_CONVERSION_ON + DEFAULT_REF0_INPUT_PAIR + DEFAULT_NORMAL_OPERATION); the internal reference is turned ON whenever the START pin is set high or the device is performing conversions (not in SLEEP mode).  Provided you allow the internal reference enough time to turn on after asserting the START pin high, this is not a problem.

    - If you want to use the device on the SDATAC x16h (Stop reading Data Continuously) mode of operation, after toggling the RESET pin, you could issue the SDATAC command once, a couple ms after RESET is asserted high (please see note regarding the RESET supervisor U3 200ms delay above) and then write all the configuration registers.  You may issue the SDATAC command once at initialization and the device will stay in this mode of operation until you issue the RDATAC x14h (Read Data Continuous Command) or until the device is RESET, (via RESET pin. RESET command or cycling power).  It is important to consider that the the SDATAC x16h command takes effect after the next DRDY.    When reading the conversion data, the correct sequence is below (it appears to be in the wrong order above):

    -  Issue Read Data Command: RDATA  x12h

    - Issue 24 SCLK's to read the data: (3 bytes NOP)

     

    If you continue having issues, please provide oscilloscope pictures of the RDATA command sequence above.  Please also verify with an external meter the VREFOUT voltage (should be 2.048V) when the internal reference is On and the voltage accross the 1kOhm RBIAS/Referece resistor across REFP0 and  REFN0.  With the two IDAC sources set at 1000uA IDAC, the voltage should be 2V across REFP0 and REFN0.

    Thank you and Best Regards,

    Luis

  • HI Luis,

    you wrote that the right sequence is :

    -  Issue Read Data Command: RDATA  x12h ==> WRITE  SPI 0x12

    - Issue 24 SCLK's to read the data: (3 bytes NOP)  ==> READ SPI 24 bits

    Must I write on DIN pin 3 NOP commands before READ or after READ?

    Regards,

    Alessandro

  • Hi Alessandro,

    Since in this case the device is configured in the SDATAC mode, you need to issue the RDATA command, and after the RDATA command, then issue 24sclk's to read the conversion results; take a look at Figure 78 posted above...

    If you continue to have issues, please provide oscilloscope pictures of the SPI: SCLK, DIN, DOUT, CS during the RDATA command sequence. It appears per your description that you are able to read the Register contents without issues, is this correct?  Please also verify with an external meter the VREFOUT voltage (should be 2.048V) when the internal reference is On and the voltage accross the 1kOhm RBIAS/Referece resistor across REFP0 and  REFN0.  With the two IDAC sources set at 1000uA IDAC, the voltage should be 2V across REFP0 and REFN0.

    Thank you and Best Regards,

    Luis

  • HI Luis,

    I have an old Tektronix and I can not export pictures. I made some photos of the screen.

    I measured the Internal Reference and Vbias across REFP0 and REFN0:

    - 2.048 V Internal Reference

    - 1.997 V Vbias

    As you know I want to use two 3-wire RTDs. I made some experiments. If I use the following sequence (I measure only RTD connected AIN0-AIN1):

                    CS always low

                    RESET  always High
                   START high
                   delay(5);
                   ads1247_init_spi();              
                   Stop_Read_Data_Continuous();
                   ads1247_write_register(WRITE_MUX0_REGISTER,  SINGLE_BYTE_READ_WRITE, DEFAULT_BCS_OFF + DEFAULT_AIN0_P + DEFAULT_AIN1_N);
                   ads1247_write_register(WRITE_VBIAS_REGISTER,  SINGLE_BYTE_READ_WRITE, 0x00);
                  ads1247_write_register(WRITE_MUX1_REGISTER,  SINGLE_BYTE_READ_WRITE, INTERNAL_REF_ON_IF_CONVERSION_ON + DEFAULT_REF0_INPUT_PAIR + DEFAULT_NORMAL_OPERATION);
                  ads1247_write_register(WRITE_SYS0_REGISTER,  SINGLE_BYTE_READ_WRITE, DEFAULT_GAIN_OF_1 + DATA_RATE_OF_2000SPS);
                  ads1247_write_register(WRITE_IDAC0_REGISTER, SINGLE_BYTE_READ_WRITE, DEFAULT_ONLY_DATA_OUT + IDAC_1000uA);
                   ads1247_write_register(WRITE_IDAC1_REGISTER, SINGLE_BYTE_READ_WRITE, IDAC1_AIN0 + IDAC2_AIN1);     
                   delay(30);
                   Self_Offset_Calibration();            
                   delay(22);             
                   Read_Data_Manually();
                   Read_24bit_Data(&RTD_Voltage1);

                  ads1247_close();
                   GPIO_E5_clr();

    All  the measurements are correct also on more runs. The pictures in attach are for this situation during:

                   Read_Data_Manually();
                   Read_24bit_Data(&RTD_Voltage2); 

    Blue line is DRDY

    Green line is DOUT

    Red line is SCLK

    I have still issues when I switch from AIN0-AIN1 to AIN2-AIN3 and I perform a measure.

    Following the sequence I use with two 3-wire RTDs:

                   CS low  RESET high (always)
                   START high
                   delay(5);
                   ads1247_init_spi();              
                   Stop_Read_Data_Continuous();
                   ads1247_write_register(WRITE_MUX0_REGISTER,  SINGLE_BYTE_READ_WRITE, DEFAULT_BCS_OFF + DEFAULT_AIN0_P + DEFAULT_AIN1_N);
                   ads1247_write_register(WRITE_VBIAS_REGISTER,  SINGLE_BYTE_READ_WRITE, 0x00);
                  ads1247_write_register(WRITE_MUX1_REGISTER,  SINGLE_BYTE_READ_WRITE, INTERNAL_REF_ON_IF_CONVERSION_ON + DEFAULT_REF0_INPUT_PAIR + DEFAULT_NORMAL_OPERATION);
                  ads1247_write_register(WRITE_SYS0_REGISTER,  SINGLE_BYTE_READ_WRITE, DEFAULT_GAIN_OF_1 + DATA_RATE_OF_2000SPS);
                  ads1247_write_register(WRITE_IDAC0_REGISTER, SINGLE_BYTE_READ_WRITE, DEFAULT_ONLY_DATA_OUT + IDAC_1000uA);
                  ads1247_write_register(WRITE_IDAC1_REGISTER, SINGLE_BYTE_READ_WRITE, IDAC1_AIN0 + IDAC2_AIN1);     
                  delay(30);
                  Self_Offset_Calibration();            
                  delay(22);             
                   Read_Data_Manually();
                   Read_24bit_Data(&RTD_Voltage1);  
     

                  GPIO_E5_clr();
                   delay(10);
                   GPIO_E5_set();
                   delay(30);
                   ads1247_write_register(WRITE_MUX0_REGISTER,  SINGLE_BYTE_READ_WRITE,DEFAULT_BCS_OFF + AIN2_P + AIN3_N);
                   ads1247_write_register(WRITE_IDAC1_REGISTER, SINGLE_BYTE_READ_WRITE, IDAC1_AIN2 + IDAC2_AIN3);   
                   delay(30);
                   Read_Data_Manually();
                   Read_24bit_Data(&RTD_Voltage2); 
                   ads1247_close();
                   GPIO_E5_clr();

    I will send you some picture of the scope on this sequence during:

                   Read_Data_Manually();
                   Read_24bit_Data(&RTD_Voltage2); 

    Best regards,

    Alessandro

  • Hello Alessandro,

    -During the second part of the sequence, where the second RTD is being measured; can you please confirm what is the voltage across AIN2 and AIN3 and what is the RTD expected value?  What is the voltage across REFP0 and REFN0 at this point in the sequence?  What is the conversion result in codes obtained?  

    If possible, please provide a diagram detailing the ADS1247EVM header connections to the RTD's (if this is the 3-Wire configuration using a compensation resistor RCOMP, please confirm the value of RCOMP resistor).  Also, detailed or zoomed-in oscilloscope shots may be helpful to verify the timing.  On the WREG commands shown above, detailed oscilloscope shot showing the DIN and SCLK as the WREG command sequence is issued (3 Bytes) and in the RDATA sequence, zoom-in plots of the RDATA command byte, and the 3 bytes of the conversion data (DOUT/SCLK

    ads1247_write_register(WRITE_MUX0_REGISTER,  SINGLE_BYTE_READ_WRITE,DEFAULT_BCS_OFF + AIN2_P + AIN3_N);
    ads1247_write_register(WRITE_IDAC1_REGISTER, SINGLE_BYTE_READ_WRITE, IDAC1_AIN2 + IDAC2_AIN3); 

    --> Stop sequence, verify AIN2-AIN3 differential voltage and VREFP0/VREFN0 with external meter; then continue with the sequence

    Read_Data_Manually();
    Read_24bit_Data(&RTD_Voltage2);
     

    Thank you and Best Regards,

    Luis

  • Hi Luis,

    what I don't understand is:

    when I run the following sequence:

      CS low  RESET high (always)
      START high (always)
      delay(5);
      Stop_Read_Data_Continuous();
      ads1247_write_register(WRITE_MUX0_REGISTER,  SINGLE_BYTE_READ_WRITE, DEFAULT_BCS_OFF + DEFAULT_AIN0_P + DEFAULT_AIN1_N);
      ads1247_write_register(WRITE_VBIAS_REGISTER,  SINGLE_BYTE_READ_WRITE, 0x00);
      ads1247_write_register(WRITE_MUX1_REGISTER,  SINGLE_BYTE_READ_WRITE, INTERNAL_REF_ON_IF_CONVERSION_ON + DEFAULT_REF0_INPUT_PAIR + DEFAULT_NORMAL_OPERATION);
      ads1247_write_register(WRITE_SYS0_REGISTER,  SINGLE_BYTE_READ_WRITE, DEFAULT_GAIN_OF_1 + DATA_RATE_OF_2000SPS);
      ads1247_write_register(WRITE_IDAC0_REGISTER, SINGLE_BYTE_READ_WRITE, DEFAULT_ONLY_DATA_OUT + IDAC_1000uA);
      ads1247_write_register(WRITE_IDAC1_REGISTER, SINGLE_BYTE_READ_WRITE, IDAC1_AIN0 + IDAC2_AIN1);     
      delay(30);
      Self_Offset_Calibration();            
      delay(22);             
      Read_Data_Manually();
      Read_24bit_Data(&RTD_Voltage1); 

     

    The result is correct:

    Code: 463459 (room temperature)

    the voltage across REFP0 and REFN0: 1997mV (1KOhm Rbias)

    After I comment the previous sequence and I run  the following sequence:

      CS low  RESET high (always)
      START high (always)
     

      delay(5);
      Stop_Read_Data_Continuous();
      ads1247_write_register(WRITE_MUX0_REGISTER,  SINGLE_BYTE_READ_WRITE, DEFAULT_BCS_OFF + AIN2_P + AIN3_N);
      ads1247_write_register(WRITE_VBIAS_REGISTER,  SINGLE_BYTE_READ_WRITE, 0x00);
      ads1247_write_register(WRITE_MUX1_REGISTER,  SINGLE_BYTE_READ_WRITE, INTERNAL_REF_ON_IF_CONVERSION_ON + DEFAULT_REF0_INPUT_PAIR + DEFAULT_NORMAL_OPERATION);
      ads1247_write_register(WRITE_SYS0_REGISTER,  SINGLE_BYTE_READ_WRITE, DEFAULT_GAIN_OF_1 + DATA_RATE_OF_2000SPS);
      ads1247_write_register(WRITE_IDAC0_REGISTER, SINGLE_BYTE_READ_WRITE, DEFAULT_ONLY_DATA_OUT + IDAC_1000uA);
      ads1247_write_register(WRITE_IDAC1_REGISTER, SINGLE_BYTE_READ_WRITE, IDAC1_AIN2 + IDAC2_AIN3);     
      delay(30);
      Self_Offset_Calibration();            
      delay(22);             
      Read_Data_Manually();
      Read_24bit_Data(&RTD_Voltage1);

    The result is correct:

    Code: 421888 (probe into the ice)

    the voltage across REFP0 and REFN0: 1997mV (1KOhm Rbias)

    When I put a sequence after another sometime ads1247_write_register doesn't change the register values. Sometime it can write MUX0 register sometime no, sometime it writes MUX0 but not IDAC0 etc.

    What I must put between the above sequences in order to have one flow that works?

    Best regards.

  • Alessandro,

    It could be that for some reason the SDATAC command is not being issued correctly.  It is also possible that you have noise in your communication, in particular false triggering on your SCLK line.

    Your basic functions appear to flow correctly, although you do not need to always write registers that don't change value.  It is not clear what happens with the functions Read_Data_Manually() and Read_24bit_data() actually do.  Could this be causing an issue?

    The only good troubleshooting tool with respect to communication is an oscilloscope.  The pictures you sent in an earlier posting doesn't show enough detail as to what may be happening.

    Best regards,

    Bob B

  • Hi Bob,

    following you can find the two functions Read_Data_Manually() and Read_24bit_data():

    void Read_Data_Manually()
    {
        uint8_t command = READ_DATA_MANUALLY;  //0x13
        HAL_WriteSpi(&spiDesc, &command, sizeof(uint8_t));
    }

    void Read_24bit_Data(unsigned long *RTD_Voltage_Ptr)
    {

            for(i = 1; i <= 3; i++){
            HAL_ReadSpi(&spiDesc, (uint8_t *)&b1, sizeof(uint8_t));
            bufferIN = b1;
            if (i == 1){
                *RTD_Voltage_Ptr = (*RTD_Voltage_Ptr + bufferIN) << 8;
            }
            else if (i == 2){
                *RTD_Voltage_Ptr = (*RTD_Voltage_Ptr + bufferIN) << 8;
            }
            else if (i == 3){
                *RTD_Voltage_Ptr = *RTD_Voltage_Ptr  + bufferIN;
            }

    Best regards,

    Alessandro

  • Alessandro,

    Is there any point In your routine where you might be turning on RDATAC?

    Best regards,

    Bob B 

  • Hi Bob,

    No, there aren't.

    I noted that when I put a break point (I am using a debugger) between the two sequences, I results are correct also with more runs.

    Best regards,

    Alessandro

  • Alessandro,

    If the problem goes away by stopping the program, then you most likely either have a timing issue or a noise issue that is created with the data lines toggling more often.  Have you tried slowing down your communication to see if that solves the problem?  Another issue could be poor grounding.  A lot of ground bounce can corrupt the communication transfer.  Can you send me a picture of your setup?  Can you send me some better pictures of the scope so that I can actually see the SLCK transitions relative to the data in and out?

    Best regards,

    Bob B