I'm just starting out in Micro controllers. I want to get to understand I2C and how to set up the communications for it. I was hoping someone may have sample code for the SHT21 sensor that uses I2C. I would really appreciate it if someone would help me on how to get it going or share the code with me.
Thank you very much
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
Posted: Fri Jan 14, 2011 9:31 am
The SHTXX series sensor is not Truely I2C compliant. They do use the standard I2C command structure but the Start sequence is a little different. If you want to learn how I2C functions you might want to grab a small eeprom and start working with that. You would be able to send it commands, write data to it and then read that data back to verify the data was sent properly. This would allow you to verify your actions.
There are several posts regarding I2C communications on this forum. Also, I believe there is code that has been posted to work with the SHT series sensors.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum