Shop OBEX P1 Docs P2 Docs Learn Events
Need help using SX to read SHTX — Parallax Forums

Need help using SX to read SHTX

ElectrixElectrix Posts: 3
edited 2007-07-04 20:59 in General Discussion
Hello,
I am trying to use an SX 28AC DP chip to read temperature and humidity data from a Sensirion SHTX chip. The SHTX data sheet shows that you must send a transmission reset followed by an adress (000) in this case followed by a command to read temp or humidity. I believe I have the proper code to do so but I cannot get the SHTX chip to send any data back.
If anyone has·some·"known good" code to accomplish this It would be very greatly appreciated. I am beginning to think·I may have a bad SHTX chip.

···································································· Thanks,

···································································· Big Rick

Comments

  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2007-07-03 22:25
    Rick,

    I assume that you are using a Sensirion SHT11 device - right? Although the SHT11 is controlled via two lines, SDA and SCL as used on an I2C bus, the SHT11 protocol is not fully compatible to the I2C protocol. After you have sent the transmission start, the address 000, and the command byte, the SHT11 starts the temperature or humidity measurement which may take several milliseconds, depending on the resulution you have requested. The SHT11 signals the end of conversion by pulling low the SDA line. This behavior makes it incompatible to the I2C protocol. I don't know why the SHT11 developers have choosen this method instead of a compatible acknowledge-polling approach as I2C EEPROMs do, but we'll have to live with it now.

    Did you write your code in SX/B, or in Assembly?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • ElectrixElectrix Posts: 3
    edited 2007-07-04 16:45
    Hi Gunther,
    Yes I am using a SHT11 that is mounted to a small board by Parallax - Item # 28018.
    I wrote the program in assembly and I hooked up an oscilloscope so I can actually watch the SX pins and the debug windows sending clock and data pulses to the SHT11. Everything seems to be working exactly as the datasheet calls for but after I send it the temp or humidity read command the SHT11 never pulls the data line low to signal that the reading is complete.
    I will recheck everything again but I must be missing something. Please let me know if you have any ideas.

    Thanks
    Rick
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2007-07-04 18:56
    Hi Rick,

    just a stupid question: Did you attach pull-up resistors between the data line and Vdd (a 2.2 to 10 kOhm resistor would be fine) ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • JonnyMacJonnyMac Posts: 8,945
    edited 2007-07-04 19:07
    The Parallax module has a pull-up on the data line. You might want to put a 4.7K pull-down on the clock line, though, as this has been shown to cure some problems.
  • ElectrixElectrix Posts: 3
    edited 2007-07-04 20:59
    Hi Guys,
    Acording to the Parallax/Sensirion data sheet for the #28018 module the 4.7k pull-up resistor for the data line is included on the board.as well as a 330 ohm buffer resistor between the data line and the SX. There is no pull-down on the clock line but I also tried that as Jonny Mac suggested. Still nothing - This darn chip just doesn't want to wake up and talk to me. The battle continues - Any other ideas would be greatly appreciated...

    Thanks Guys

    Rick
Sign In or Register to comment.