Author Topic: Are Two wire Interface and I2C the same thing? This says no.  (Read 1862 times)

0 Members and 1 Guest are viewing this topic.

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Are Two wire Interface and I2C the same thing? This says no.
« on: October 29, 2009, 09:25:05 PM »
Everywhere i look, says TWI and I2C are the same thing with different names.

Why the does this sensor's

http://www.sparkfun.com/commerce/product_info.php?products_id=8257

datasheet

http://www.sparkfun.com/datasheets/Sensors/SHT1x_datasheet.pdf

say otherwise? "The sensor
cannot be addressed by I2C protocol, however, the sensor
can be connected to an I2C bus without interference with
other devices connected to the bus."


Can anyone clear this up?




Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #1 on: October 29, 2009, 10:03:16 PM »
Unless I'm mistaken the datasheet does not say that it uses a TWI either. It says it uses a 2-wire serial interface, but I think this is a generic term and does not refer to TWI. For instance the PS/2 mouse and keyboard protocol is also a 2-wire serial interface but has nothing to do with I2C and TWI.

Chelmi.

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #2 on: October 29, 2009, 10:18:40 PM »
So you are saying this sensor has it's own proprietary communications method?

While i'm not saying your wrong, how is a sensor that implements a non-standard communications protocol worth anything?

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #3 on: October 29, 2009, 10:51:03 PM »
After looking at the protocol more carefully, it seems to be "compatible" with I2C, meaning that a I2C capable device might be able to communicate with it "easily". However it does not seem to follow the I2C/TWI standard.

Chelmi.

Offline arixrobotics

  • Full Member
  • ***
  • Posts: 119
  • Helpful? 3
    • TalasTronics WCIT KL2008 Fund Raising
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #4 on: October 30, 2009, 06:46:03 AM »
I don't really know much about I2C and TWI protocol, so I can't comment much on your issue. However, I'd like to share some probably related info.

1. I read in an article about RTCs, and they said the datasheet for this particular RTC chip does not state that they are using I2C to avoid paying royalties. They just say its a two wire protocol.

2. The DS1302 RTC chip uses a two wire protocol, but not I2C. I had to write some kind of bit banging code to get it to work. So there are some devices which do not implement standard communications protocol.

:-\

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #5 on: October 30, 2009, 07:24:49 AM »
2. The DS1302 RTC chip uses a two wire protocol, but not I2C. I had to write some kind of bit banging code to get it to work. So there are some devices which do not implement standard communications protocol.

The DS1302 has a chip select, clock, and bidirectional data line. It isn't two-wire / I2C as the communication delimiters are the selection and deselection of of the chip enable (CE) line, not the signal transition during a high clock like I2C. It is more like SPI with MISO and MOSI lines connected.


Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #6 on: October 30, 2009, 03:45:01 PM »
Thanks, I'll start googling, but are there any libraries written for this (that you know of), or am I implementing this from the ground up?


Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #7 on: October 30, 2009, 05:10:33 PM »
look at the application notes from Atmel:

http://atmel.com/dyn/products/app_notes.asp?family_id=607

AVR155 is probably a good start.

Chelmi.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #8 on: October 31, 2009, 12:14:44 AM »
Hi,

http://www.sparkfun.com/commerce/product_info.php?products_id=8257
Please tell me you didn't pay $42 for this?
The company used to give away free samples of that chip, at least about 10 years ago (I still have a couple of them in mint condition, as I simply never got around to including them in a proto - oh well, seems like there's another project in the quieve then :))

Look at: http://www.sensirion.com/en/pdf/product_information/Sample_Code_humidity_sensor_SHTxx.pdf

Sample Code: http://www.sensirion.com/en/Installationsprogramme/Sample_Code_C1.zip

More to look through:
http://www.sensirion.com/en/pdf/product_information/CRC_Calculation_Humidity_Sensor_E.pdf
http://www.sensirion.com/en/pdf/product_information/AN-humidity-formulae.pdf
http://www.sensirion.com/en/pdf/product_information/Introduction_to_Relative_Humidity_E.pdf

Happy reading :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Are Two wire Interface and I2C the same thing? This says no.
« Reply #9 on: October 31, 2009, 10:03:33 AM »
Thanks, I'll look through it when i get a chance.

I Have not paid $42 for those sensors yet, if you know of a better product I am open to suggestions.

At this point i might give up humidity and just use something like this

http://www.sparkfun.com/commerce/product_info.php?products_id=9418

at $6 and a I2C interface.

 


Get Your Ad Here