User Tools

Site Tools


tutorials:library:i2caddr.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
tutorials:library:i2caddr.html [2012/05/01 19:06]
ladyada [Address table]
tutorials:library:i2caddr.html [2016/01/28 18:05]
127.0.0.1 external edit
Line 3: Line 3:
  
  
-When people need to communicate with each other, we use language. If two people speak the same language, they can talk all they want about all sorts of topics. If they don't speak the same language, communication is difficult. Likewise, electronic parts need to communicate - and they also have their own languages. There are a few common languages that are spoken. The most popular ones are TTL Serial, SPI, I2C, I2S, 1-Wire, and Parallel (such as 8080 or 6800). Of these, Parallel and SPI can 'share a bus' using a select line - mulitple devices can share the pins as long as they have a single pin that can be used to indicate who is permitted to speak at one time. 1-Wire and I2C are true shared-bus protocols - you can have 100+ components all talking at once using the same 2 wires (for I2C) or 1 -wire (for the aptly-named 1-wire). 1-Wire is much slower than I2C and is a strongly-patented protocol owned by Maxim so you won't see a lot of devices out there other than Maxim/​Dallas parts that use 1-wire. ​+When people need to communicate with each other, we use language. If two people speak the same language, they can talk all they want about all sorts of topics. If they don't speak the same language, communication is difficult. Likewise, electronic parts need to communicate - and they also have their own languages. There are a few common languages that are spoken. The most popular ones are TTL Serial, SPI, I2C, I2S, 1-Wire, and Parallel (such as 8080 or 6800). Of these, Parallel and SPI can 'share a bus' using a select line - mulitple devices can share the pins as long as they have a single pin that can be used to indicate who is permitted to speak at one time. 1-Wire and I2C are true shared-bus protocols - you can have 100+ components all talking at once using the same 2 wires (for I2C) or 1-wire (for the aptly-named 1-wire). 1-Wire is much slower than I2C and is a strongly-patented protocol owned by Maxim so you won't see a lot of devices out there other than Maxim/​Dallas parts that use 1-wire. ​
  
  
  
-I2C is incredibly popular beccause it uses only 2 wires, and like we said, multiple devices can share those wires, making it a great way to connect tons of sensors, drivers, expanders, without using all the microcontroller pins. The only bad news about I2C is that **each I2C device must have a unique address** - and the addresses only range from 0 to 127 (0 to 0x3F hex). One thing this means is that if you have two accelerometers (lets say) and they both have address 0x22 you cannot have both of them on the same I2C lines. There are a few work-arounds. One is you might be able to power down or '​de-select'​ one sensor or another at a time. Another is that some boards have an address-select line or jumper or other configuration. If you can set one to a different address you're good to go.+I2C is incredibly popular beccause it uses only 2 wires, and like we said, multiple devices can share those wires, making it a great way to connect tons of sensors, drivers, expanders, without using all the microcontroller pins. The only bad news about I2C is that **each I2C device must have a unique address** - and the addresses only range from 0 to 127 (aka 0 to 0x7F hex). One thing this means is that if you have two accelerometers (lets say) and they both have address 0x22 you cannot have both of them on the same I2C lines. There are a few work-arounds. One is you might be able to power down or '​de-select'​ one sensor or another at a time. Another is that some boards have an address-select line or jumper or other configuration. If you can set one to a different address you're good to go.
  
  
Line 25: Line 25:
  
 ^  Type  ^  Part #  ^  Notes  ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  ​ ^  Type  ^  Part #  ^  Notes  ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  Address ​ ^  ​
-|  OLED  |  SSD1306 ​ | One addr pin  |  0x3C  |  0x3D  | +|  OLED  |  ​[[http://​www.solomon-systech.com/​en/​product/​display-ic/​oled-driver-controller/​ssd1306/​|SSD1306]]  | One addr pin  |  0x3C  |  0x3D  | 
-|  NFC/​RFID ​ |  PN532  | |  0x48  | +|  NFC/​RFID ​ |  ​[[http://​www.adafruit.com/​products/​364|PN532]]  | |  0x48  | 
-|  Sensor ​ |  TSL2561 ​ | 1 tri-state addr pin |  0x29  |  0x39  |  0x49  | +|  Sensor ​ |  ​[[http://​www.adafruit.com/​products/​439|TSL2561]]  | 1 tri-state addr pin |  0x29  |  0x39  |  0x49  | 
-|  Sensor ​ |  BMP085 ​ | Can use XCLR to select/​deselect |  0x77  | +|  Sensor ​ |  ​[[https://​www.adafruit.com/​products/​391|BMP085]]  | Can use XCLR to select/​deselect |  0x77  | 
-|  Sensor ​ |  ADXL345 ​ | 1 address pin  |  0x1D |  0x53  | +|  Sensor ​ |  ​[[http://​www.analog.com/​en/​mems-sensors/​mems-inertial-sensors/​adxl345/​products/​product.html|ADXL345]]  | 1 address pin  |  0x1D |  0x53  | 
-|  Sensor ​ |  HMC5883L ​ |  |  0x1E  | +|  Sensor ​ |  ​[[http://​www.magneticsensors.com/​three-axis-digital-compass.php|HMC5883L]]  ​| ​ |  0x1E  | 
-|  Sensor ​ |  BMA180 ​ |  |  ​0x40 ​ ​|  ​0x41  | +|  Sensor ​ |  ​[[http://​www.digikey.com/​us/​en/​ph/​Bosch/​BMA180.html|BMA180]] ​ ​| ​ |  ​0x77  |    ​
-|  Sensor ​ |  MMA7455L ​ | Same as ADXL345 ​ |  0x1D  | +|  Sensor ​ |  ​[[http://​www.freescale.com/​webapp/​sps/​site/​prod_summary.jsp?​code=MMA745xL|MMA7455L]]  | Same as ADXL345 ​ |  0x1D  | 
-|  Sensor ​ |  VCNL4000 ​ |  |  0x13  | +|  Sensor ​ |  ​[[http://​www.adafruit.com/​products/​466|VCNL4000]]  ​| ​ |  0x13  | 
-|  Sensor ​ |  ITG3200 ​ |  |  0x68  |  0x69  | +|  Sensor ​ |  ​[[http://​invensense.com/​mems/​gyro/​itg3200.html|ITG3200]]  ​| ​ |  0x68  |  0x69  | 
-|  Sensor ​ |  MS5607 ​ | Same as MS5611 ​ |  0x76  |  0x77  | +|  Sensor ​ |  ​[[http://​www.meas-spec.com/​product/​MS5607-B.aspx|MS5607]]  | Same as MS5611 ​ |  0x76  |  0x77  | 
-|  Sensor ​ |  MS5611 ​ | Same as MS5607 ​ |  0x76  |  0x77  | +|  Sensor ​ |  ​[[http://​www.meas-spec.com/​product/​t_product.aspx?​id=8501|MS5611]]  | Same as MS5607 ​ |  0x76  |  0x77  ​
-|  RTC  |  DS1307 ​ | Same as DS3231 ​ |  0x68  | +|  Sensor ​ |  LSM9DS0 (Accel + Mag) | Same as ADXL345/​MMA7455 | 0x1D | 
-|  RTC  |  DS3231 ​ | Same as DS1307 ​ |  0x68  | +|  Sensor ​ |  LSM9DS0 (Gyro) | | 0x6B | 
-|  I/O  |  MCP23008 ​ | 3 addr pins  |  0x20  |  0x21  |  0x22  |  0x23  |  0x24  |  0x25  |  0x26  |  0x27  | +|  Sensor ​ |  LSM303 (Accel) | | 0x19 | 
-|  I/O  |  MCP23017 ​ | 3 addr pins  |  0x20  |  0x21  |  0x22  |  0x23  |  0x24  |  0x25  |  0x26  |  0x27  |+|  Sensor ​ |  LSM303 (Mag) | Same as HMC5883L | 0x1E 
 +|  RTC  |  ​[[http://​www.adafruit.com/​products/​264|DS1307]]  | Same as DS3231 ​ |  0x68  | 
 +|  RTC  |  ​[[https://​www.adafruit.com/​products/​255|DS3231]]  | Same as DS1307 ​ |  0x68  | 
 +|  I/O  |  ​[[https://​www.adafruit.com/​products/​593|MCP23008]]  | 3 addr pins  |  0x20  |  0x21  |  0x22  |  0x23  |  0x24  |  0x25  |  0x26  |  0x27  | 
 +|  I/O  |  ​[[https://​www.adafruit.com/​products/​732|MCP23017]]  | 3 addr pins  |  0x20  |  0x21  |  0x22  |  0x23  |  0x24  |  0x25  |  0x26  |  0x27  | 
 +|  PWM  |  PCA9685 ​ |  6 addr pins!  |  0x40 thru 0x4F  |  
 +|  DAC  |  MCP4725A0 ​ |  1 addr pin, 3 variants ​ |  0x60  |  0x61  | 
 +|  DAC  |  MCP4725A1 ​ |  1 addr pin, 3 variants ​ |  0x62  |  0x63  | 
 +|  DAC  |  MCP4725A2 ​ |  1 addr pin, 3 variants ​ |  0x64  |  0x65  | 
 +|  DAC  |  MCP4725A3 ​ |  1 addr pin, 3 variants ​ |  0x66  |  0x67  | 
 +|  Radio  |  TEA5767 ​ |  Conflicts with MCP4725A0 ​ |  0x60  | 
 +|  Radio  |  Si4713 ​ |  1 addr pin  |  0x11  |  0x63  | 
 +|  Touch  |  FT6206 ​ |  |  0x38  | 
 +|  Touch  |  STMPE610 ​ |  Same as STMPE811 ​ |  0x41  |
  
 We'll update this with more as we use other chips! We'll update this with more as we use other chips!
- 
/home/ladyada/public_html/wiki/data/pages/tutorials/library/i2caddr.html.txt · Last modified: 2017/07/30 03:37 by ladyada