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.

conversion time is 80 msec not 16 and datardy never goes low

Other Parts Discussed in Thread: HDC1000, HDC1050, HDC1080

After many revisions trying to read Temp and Humidity I finally realized the specs are wrong and the data ready does not work.

Here is the code that does work. It is written in spin , a variant of object pascal, for the Parallax Propeller.

PUB ReadTempHumid(SCLPin,devAddr) : x | config                        'x is returned config is local variable

  DIRA[HDCdataReady]~ 'Set pin to input

  x := 0

  config := ReadRegister(HDCclockPin,i2cAddr,configReg)

  if ((config << 3) >> 7) == 0

       WriteConfig(SCLPin,devAddr,config |= %00010000_00000000)

  i2c.Start(SCLPin)

  i2c.Write(SCLPin, devAddr | Xmit)

  i2c.Write(SCLPin, $00)

'wait for HDCdataReady to go low

' Repeat until INA[HDCdataReady] == 0                                                 'never happens

  repeat while i2c.Write(SCLPin, devAddr | Recv) == NAK

       x += 1

       waitcnt(5_000 +cnt)                                                                                'wait 1 ms loops 79 0r 80 times

  temperature := (i2c.Read(SCLPin,ACK) << 8)                                        'write to global vars

  temperature |= i2c.Read(SCLPin,ACK)

  humidity := (i2c.Read(SCLPin,ACK) << 8)

  humidity |= i2c.Read(SCLPin,NAK)

  i2c.Stop(SCLPin)

I'll add C code when available

  • Hi Michael,
    This is not the expected behavior. Could you please forward to us the schematic of your HDC1000 connections (please, double check if the
    DRDYn is connected to VDD through a pull-up resistor), and a oscilloscope acquisition of the I2C's read sequence?
    Thanks in advance.
    Best regards,
    Carmine
  • Hi Carmine

    I just rechecked and found the processor is running at 80Mhz not 5Mhz.  The conversion time is therefore 12ms.  My mistake.

    There is still the problem with the DRDY.   I am using the last two sections of the EVM. I have continuity from the EVM to the processor pin and 10k resistance from the pin to Vdd.  The EVM itself works fine but I don't know how the TI code establishes data ready - Does it use the DRDY or wait 16ms or keep checking?

    Thanks for the reply

    Mike

  • Hi Mike,

    Sorry for the delay in the answer.

    I confirm that the HDC1000EVM uses the DRDYn interrupt pin to trigger the I2C read of temperature and humidity.

    Attached an oscilloscope acquisition of the DRDYn pin behavior in the HDC1000EVM.

    Please let me know should you have any doubts or need further information.

    Best regards,

    Carmine

  • Carmine,

    I hope that you got my reply that the evm works even when the DRDY is disconnected.

    I now have some additional information. The DRDY seems to be going low and then high before the read. This trace is with the read. The clock is yellow and the DRDY is blue

    This trace is without the read

    What do you make of it?

  • Hi Micheal,

    Sorry, I didn't get your reply that the evm works even when the DRDY is disconnected.

    In any case this is correct: the EVM source code is the same for HDC1000EVM and HDC1050EVM (where the DRDYn pin is not available), and for this reason the read function is triggered by the DRDYn pin if present (in case of HDC1000) or after a timeout of 16msec (for the HDC1050). So, if you disconnect the DRDYn pin in the HDC1000EVM, the EVM works anyway due to the presence of the 16msec timeout.

    Regarding your screenshot, the behavior of DRYDn pin seems correct: according to the HDC1000 Datasheet, the DRDYn line is set to low when the measurement is complete, and come back to high when the output register is read, or when the next measurement is triggered.

    Please let me know if this replies to your question.

    Best regards,

    Carmine

  • On the second screen shot there is no read() so I expected the DRDY to remain low but it does not. It comes back up before the read() starts. Is that what you see?

    So the HDC1050 does not have a DRDY and that is the replacement for the HDC1000?   So there is no reason to factor the DRDY into future software?  It does seem the DRDY is redundant.

    You mentioned the TI software , Is it available to customers? The only software I found was the host software for the EVM and not the EVM to HDC1000 software.  Did I misunderstand how the EVM works??

  • Hi Micheal,

    Maybe I have misunderstood the meaning of the yellow signal: is it not the I2C clock?

    In any case I have done a further acquisition that better explains how the DRDYn pin works. In this acquisition, I have triggered the Temperature reading, pointing the HDC1000 output register at the address 0x00 (it is a I2C write at the register 0x00, followed by no data), and I read the register after 1.6sec. As you can see the DRDYn pin goes low after 12msec from the measurement triggering, and returns high as soon as I start the reading function:

    1) Measurement trigger -> i2c write at register 0x00 (followed by no data)

    2) after 12msec the DRDYn goes low, showing that the data is available:

    3) DRDYn stays low for 1.6sec (please refer to the top of the pictures that shows the complete acquisition), and it goes high as soon as the read procedure starts:

    The HDC1050 is not the replacement of HDC1000/8: they are two different package version of the same device, and for this reason they are SW compatible, except for the Data Ready pin functionality. The Data Ready interrupt is a feature that is present only in the HDC1000/8 version and enables the user to read the data only when it is really available, avoiding to keep busy the I2C bus (in polling mode), or to use a timer to trigger the measurement.

    For EVM source code, I meant the firmware that is on board on the EVM, and yes, it  is available for the costumer. To get it you need to go to:


    www.ti.com/tool/HDC1000EVM


    and download and install the TI Sensing Solutions EVM GUI Tool (v.1.8.8). This GUI supports several EVMs, including the HDC1000, HDC1050 and HDC1080. Once the GUI is installed, you can find the firmware source code for the HDC1000EVM under the folder

     

    C:\ti\Sensing Solutions EVM GUI-1.8.8\EVM Firmware\HDC10x0_EVM_Firmware_source\


    Please let me know should you need further information.

    Best regards,

    Carmine

       

  • Yes the yellow is the clock. The difference between the software I am using and yours is my clock goes and stays low while TIs stays high. My prolonged low clock seems to be triggering the DRDY to go high rather than staying low. I'll have to rewrite the assembler to stay high (I did not write the original). This is not difficult.
    Digikey informed me the HDC1000EVM was discontinued so I assumed the 1050 was a replacement.
    Yes I have the software for the EVM but it is not much help since the MSP430 is interupt driven and the details seem to be in the on board firm ware. With the propeller chip there are no interrupts but there are 7 available processors (cogs) that run independently and have access to all 32 GPIO.
    I think I have enough info now write the assembler for both spin and C.
    Thank you for your help it is very much appreciated.