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.

HDC2010: HDC2010 I2C Communications

Part Number: HDC2010
Other Parts Discussed in Thread: TMP116

With a NXP 9S08QG8 Micro Controller

When reading the four registers for TempLSB, TempMSB, HumidityLSB, and HumidityMSB

Before reading the last register, HumidityMSB, it is necessary to turn TXACK off before reading the last byte or you will not receive the last byte and there will be no stop bit.  The data line remains low until a power cycle. 

Also, between the Stop of one communication and the Start of another I found I had to insert a 1ms delay or the Start would not proceed.

With these things done everything is working great.

This is not exactly a question but I would love to hear any comment on the subject.

Don

  • Dear Donald -
    I found this thread on NXP Forum which is about using this MCUs, I2C and seems to describe similar, if not identical issue. (at least at the start of it)
    community.nxp.com/.../21354
    in here they refer to www.nxp.com/.../AN3291.pdf and the author of it (the app note) is replying.

    I have to ask though - is there a reason that you use this 8 bit MCU?
    Have you looked at MSP430G2x series or MSP430FRxx series from TI? These are 16 bit MCUs that are equivalently priced to what I see the MCU you are using goes for on disty website, (if not less expensive) and have a lot of support from us. I understand if you don't want to change - there are lots of reasons you could give - based on your requirements, etc., but you may at least want to have a look.

  • Hi Josh,

    Thank you for the info.  I read through all of it.  Looks like the issue is timing synchronization between master and slave.  My solution is not elegant but a 1ms delay between a Stop Bit and a new Start Bit solves one of my problems.  Turning TXACK off before the last read of multiple registers must address another timing issue.  It works but it doesn't leave my sense of what should be feeling satisfied.

    The reason for using that MCU will make you laugh.  I learned to write assembler on a Commododre64.  Familiarity is a strong motivator.  I am exploring new possibilities though. 

    I am upgrading an existing wireless temperature sensor from a TMP-112 to the HDC2010.  Had no problem with TMP-112.

    Thanks again for your help.

    Don

  • Don -
    not laughing - I myself learned/started out learning BASIC on a TI-994A and assembly on Intel 8080 :)
    plus I worked on an airborne CPU in the early 90's that used a reel to reel recorder/reproducer as the "HDD"...so its fun to see and be a part of how far we have come in tech.

    MSP430 can also use assembly based programming, but most folks use C in the IDE and there are development platforms which are easy to use and have headers on them to interface peripherals - anyway - if you get a moment, check them out. This is my favorite ==> www.ti.com/.../MSP-EXP430G2 and there is a newer one as well www.ti.com/.../msp-exp430g2et
    There is a BoosterPack which can be plugged in which has the HDC2010 and the TMP116 on it, too.
    www.ti.com/.../BOOSTXL-BASSENSORS