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.

HDC1000 Sample Source Code for EVM

Other Parts Discussed in Thread: MSP430F5528, HDC1000

Hi,

Could you please give us the sample source code for MSP430F5528 which is used as the uC on the HDC1000EVM since we would like to refer to it when we use the different uC?

Best Regards,
Kato

  • Hi Kato,

    Thanks for using TI E2E forums. I was checking in the HDC100 tools folder and it seems that this source code is not approved for release. There is a chance that the HDC Apps/Systems engineers of the parts have it and are authorize to share it with you or that this code is owned by the MSP430 group. I will forward this question to the HDC people.

    Best Regards,

    Mayrim

  • Hi Kato,

    the firmware of the uC present on the EVM contains a lot of stuff which is not strictly related to the HDC1000.

    We are working to put on the web just the routine related to the HDC1000.

    regards,

    Domenico

  • Hi Mayrim-san, Domenico-san,

    Thank you for your reply.
    Domenico-san, please let me know your plans about when you are going to release that.
    I am looking forward to hearing from you.

    Best Regards,
    Kato

  • Domenico

    I am also interested in the source code for the HDC1000EVM board.

     Ideally I'd  like to add on a second I2C  sensor to this board and have it log data to memory.

    I will go to some custom hardware for this soon but as this board does 95% of what is required it would be great if the code was available for re-use.

     

    best regards

     

    David

  • I would also like the source code, for I'm working on a design with a different (but similar) MSP430 variant and the HDC1000, and it would speed up development time if I had some code example. Is this ever going to be released?

  • We are working to format in the approved way the HDC1000 source code
    We plan to issue the code in few weeks

    Regards
    Massimo
  • Domenico, Then I am correct in my guess that the EVM main board could be used to talk to many i2c devices??? When will the EVM board be available as a stand alone sales product?
  • Edit: While this may still be true (and so I'm not removing it), please see my next post, as it may very well be possible to use the EVM with other I2C devices without modifying the firmware. 

    "Then I am correct in my guess that the EVM main board could be used to talk to many i2c devices???":
    The EVM features an MSP430 uC that communicates with the sensor via an I2C bus and the PC via a USB visualized com port. With respect to hardware, you could add additional devices to the I2C bus via the breakout pads they supply, but to utilize the hardware, you would need to write new firmware on the MSP430. The MSP430 variant you would need to reprogram is here: www.ti.com/.../msp430f5528

    Assuming the USB interface is also capable of programming the MSP430 (and this is an assumption), you may not need an additional tool for debugging and programming. Programming and coding would best be done using and IDE such as IAR or Code Composer. Essentially you would need to code firmware that communicates with the additional I2C sensors and allows you to interact with them via the PC. TI has not released the existing firmware source code for the EVM, and so you would basically have to start from scratch and re-code the existing features as well. Finally, the GUI would no longer function with the updated code, and so you'd need to interact with the module via a terminal or some other means.


    "When will the EVM board be available as a stand alone sales product?":
    TI will have to answer that, but I doubt it will ever be what you are describing. This module is sold with the intent of providing developers a means of evaluating the sensor, and to my knowledge it isn't intended to be a standalone data logging product.

  • The existing functions of the EVM board allow reading and writing to i2c registers on the HDC1000. I have not tried to read or write to any other i2c devices but would hazard a guess that the board as it stands would be capable of doing so. I have python code that I am using to read and write to the HDC1000 (tigermountainsprings.net/.../hdc1000evm-sample-code) I will probably order a few more as I need the sensors for my project and want to see if I can run 4 sensors (different addresses of course) with one stick and use the others for experimentation. I hope whoever manufactured the EVM controller for TI will make them available separately. It would also be nice if someone would sell an HDC1000 mounted on a board as is the detachable sensor on the EVM.
  • Sparkfun are normally the people I associate with breakout sensor boards but I don't think they do the HDC1000, although there are some similar temperature and humidity sensors modules.

  • I personally have implemented code on a different MSP430 variant for a project that interfaces multiple I2C sensors on a single I2C bus, and the HDC1000 is one of the sensors. I have not had any experience with the EVM.

    With regards to using other I2C devices with the existing system's firmware, I must admit that after reconsidering this, I suppose it's not entirely out of the question. It really depends how the interface was implemented on the uC. More specifically, it's possible that they made it a direct pass through (all data sent over UART transmits via I2C and all data sent over I2C gets transmitted back over the UART). If that's the case, assuming they made it robust enough, it may very well work with other devices without new firmware. For whatever reason, TI has still not released the source code for the EVM (despite multiple claims that they would...), and so the only way to know is experimentation.

    With regards to using multiple HDC1000 sensors on a single EVM I2C bus, I highly suspect this is possible. If you can specify the address of the HDC1000 via the UART interface (and from what I can tell, you can), than it should work. I believe the EVM guide explains how to configure the hardware to select a different address.  

  • I think you will find that the serial data packet sent uses three bytes to identify the packet with 0x4C 0x12 0x01 being a read command The next two bytes are (educated guess) the data length 0x00 0x03 being three bytes the first data byte is a single byte i2c address (0x40) the next is a single byte register value (0xfe for the manufacturer) it looks like the next byte is a command byte with 0x02 being a read.

    The device response has the same format with the bytes past the register address being the register information. All packets have a single byte check byte.
  • That's interesting. Based on what your saying it sounds like the MSP430 uC may be acting as a bridge, but I need more organized and detailed information to advise any more (if that's what you want).

    Please keep in mind that I don't have and will not be purchasing the EVM (I have no need), and I am just trying to advise based on extensive professional experience with other MSP430 variants and using the HDC1000 sensor with one of them.

    That being said, how did you capture this information? I'll assume you have packet sniffed the PC serial COM data in some way figure these things out, and if you want confirmation for anything, tell me in the form of:
    I opened the GUI, and did "XYZ" and the following bytes were transmitted to the device: "0xNN, 0xNN, ... ". In the case of a read, please state the response packets as well. I'm only concerned about PC serial COM data.
  • My apology, I thought you were looking for information.

    I have many decades of intercepting information and looking at packet structures in many different proprietary devices and protocols.

    For this, I intercepted the USP packets and then, using the knowledge gained, wrote code to communicate with the EVM device.

    I wish I had equipment for surface mount fabrication, I would love to make modules for the HDC1000.  I have not yet tried to

    talk directly to the i2c connection of the HDC1000.  I just have too many other irons in the fire. <GRIN>  Thank you for trying to

    help and advise us.

    The response packets from the EVM are exactly the same.so the response from a read request of register 0XFE returns:

    4C 12 01 00 04 40 FE 54 49 02 FF FF FF FF FF FF FF FF FF FF FF 02

    Note that I did not send in my request the packet extension of FF FF.......  simply sent up to and including the 0X02 check byte.

    I am not sure if the  FF FF FF FF FF FF FF FF FF FF FF 02 after the check byte is part of the return from the EVM or a function 

    of the packet intercept software.

    FYI, this *is* the serial com data sent to the PC's serial port as configured by the EVM USB serial adapter.  Same with the Raspberry Pi

    except rather than a "COM3" serial port, Debian in the /dev/serial/by-id and  /dev/serial/ by-path directories shows the EVM device.

    by-id shows usb-Texas_Instruments_MSP430-USB_Example_E89A816F1C000500-if00 -> ../../ttyACM0

    by-path shows platform-bcm2708_usb-usb-0:1.3:1.0 -> ../../ttyACM0

    Of course they both point to ACM0 however I would recommend against using ACM0 as it can also load as ACM1 

     

  • Hello Massimo-san,

    What is the status for the HDC1000 source code ? When would it be released ?

    We are also asked for one from our customer.

    Best Regards,
    Kawai
  • Takushi,

    I can't speak for TI, but due to their lack of cooperation, I referenced some TI example I2C source code for the MSP430 series, and I was able to get most of it working in a few work days. I can't give you my code because it's not mine to give (it's being used by my company for a project), but if you or someone else has some code developed that isn't working or just need some design tips, I can advise on what they need to do. 

    You may also consider referencing the newest SensorTag firmware source code. The TI sensor tags are ARM based (not MSP430), but they do have an HDC1000 on them.

  • Haha no, I was just trying to help out whoever was asking about adding other sensors (different types or the same) to the EVM's I2C bus. It sounds like you are very knowledgeable on this. I like your chicken coop project and python code too!
    Anyway, based on what I can see, it does appear that the EVM uC acts as a PC serial to I2C pass through of sorts, but without experimentation, I still don't really know. TI should just release the source code as is and let people play with it.
  • Massimo,

          Have you issued the code that interfaces the HDC1000 with an MSP430 processor using I2C? I can not get the interface to work, and I am up against a production deadline. Please help.

    Sincerely,

    Bill Jorch