[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
interfacing_i2c_devices [2014/04/04 09:23 (UTC)] – [Communicating With An I2C Device] louigi600 | howtos:hardware:arm:interfacing_i2c_devices [2023/05/28 14:46 (UTC)] (current) – [Hacking I2C in PC DIMM modules] louigi600 | ||
---|---|---|---|
Line 5: | Line 5: | ||
====== Preface ====== | ====== Preface ====== | ||
- | Most modern PC have several internal components that communicate vital information, | + | Most modern PC have several internal components that communicate vital information, |
+ | |||
+ | Should you want to hack one of the many I2C busses on your PC the easiest one to access is the one in the DIMM modules. Modern DIMM modules have an I2C eprom in them that the bios reads to find out the characteristics of the DIMM module. Since the DIMM module can be removed from PC and hacked separately without risking to damage permanently your PC it is probably your safest option. See chapter " | ||
====== Preparing Your Host System ====== | ====== Preparing Your Host System ====== | ||
Line 18: | Line 21: | ||
===== Detecting Connected Devices ===== | ===== Detecting Connected Devices ===== | ||
- | There are probably many ways to determine what's connected to an I2C bus, I chose to use stuff out of the [[http:// | + | There are probably many ways to determine what's connected to an I2C bus, I chose to use stuff out of the [[http:// |
First thing you want to know is what I2C busses are present on your system as there may be more then one and looking in the wrong bus may be frustrating: | First thing you want to know is what I2C busses are present on your system as there may be more then one and looking in the wrong bus may be frustrating: | ||
Line 258: | Line 261: | ||
====== Voltage Level Shifting ====== | ====== Voltage Level Shifting ====== | ||
You may end up with heterogeneous voltage level devices and if you have many devices the correct way to work around this problem is by using bidirectional I2C voltage level shifters like the [[ http:// | You may end up with heterogeneous voltage level devices and if you have many devices the correct way to work around this problem is by using bidirectional I2C voltage level shifters like the [[ http:// | ||
- | This is how I connected my 5v IMU pcb to a 3.3v I2C bus on my RaspberryPI: | + | This is how I connected my 5v IMU pcb to a 3.3v I2C bus on my RaspberryPI: |
+ | |||
+ | |||
+ | ====== Hacking I2C in PC DIMM modules ====== | ||
+ | As mentioned in the Preface it is possible to hack, in fact, any one of the I2C busses on your PC it's just that the one in DIMM modules it the easiest one. | ||
+ | You will need to identify these 4 connections on your DIMM module' | ||
+ | |||
+ | 200 pin SO-DIMM 1/2: | ||
+ | ^ Pin ^ Function | ||
+ | | 197 | Vcc (3v) | | ||
+ | | 193 | SDA | | ||
+ | | 195 | SCL | | ||
+ | | 185 | GND | | ||
+ | |||
+ | 204 pin SO-DIMM 3: | ||
+ | ^ Pin ^ Function | ||
+ | | 199 | Vcc (3v)| | ||
+ | | 200 | SDA | | ||
+ | | 202 | SCL | | ||
+ | | 203/204 | GND | | ||
+ | |||
+ | 260 pin SO-DIMM 4: | ||
+ | ^ Pin ^ Function | ||
+ | | 255 | Vcc (2.5v)| | ||
+ | | 254 | SDA | | ||
+ | | 253 | SCL | | ||
+ | | 251/252 | GND | | ||
+ | |||
+ | Once you have identified them you can stack up another I2C device on the bus provided it will not conflict with the addresses in use on this bus. | ||
+ | |||
+ | I have an old laptop with a 4Gb SO-DIMM 3 that is perfect for experimenting. | ||
+ | The DIMM has onboard a ST M34: a I2C bus Serial EEPROM, SPD for DRAM. I downloaded the datasheet and found that on the eprom itself | ||
+ | ^ Pin ^ Function ^ | ||
+ | | 8 | Vcc (3v) | | ||
+ | | 5 | SDA | | ||
+ | | 6 | SCL | | ||
+ | | 4 | GND | | ||
+ | |||
+ | and I double-checked that these pins are actually connected to the respective pins on the SO-DIMM module. | ||
+ | I was particularly lucky and this module has unused solder pads for a second eprom unit, making it super easy to solder some wires on the unused pats to hack another I2C device into the bus. | ||
+ | |||
+ | Next you will need to identify which bus is the one reading the eprom on the DIMM modules, there is another tool that is part of the i2ctool that comes in handy for this: decode-dimms. | ||
+ | At the beginning it will sit out a line like this | ||
+ | |||
+ | Decoding EEPROM: / | ||
+ | |||
+ | The last part 0-0050 identifies bus 0 address 50. | ||
+ | |||
+ | Looking at what devices are present on bus 0 | ||
+ | |||
+ | # i2cdetect -y 0 | ||
+ | | ||
+ | 00: 08 -- -- -- -- -- -- -- | ||
+ | 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 30: 30 -- -- -- -- 35 UU UU -- -- -- -- -- -- -- -- | ||
+ | 40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 50: UU -- 52 -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
+ | 70: -- -- -- -- -- -- -- -- | ||
+ | |||
+ | So as long as whatever device I hack into this bus does not use address 8, | ||
+ | |||
====== Sources ====== | ====== Sources ====== |