After further investigation, it seems that S1 and S2 are attached to a switch which is closed when a microSD card is inserted. This ties pin 9 to 3.3V, which would obviously interfere with I2C operation. One unexpected thing is that pin 10 also gets tied to 3.3V when the card is inserted. The schematic shows no connection to pin 10 on the baseboard.
Edit:
I was wrong, the behaviour is stranger than that. Pin 9 is always tied to 3.3V and also the shield, regardless of if a card is inserted. However, upon insertion of a card, the shield is disconnected from the other two. Summary:
No card: pin 9, shield, and Vout all connected.
Card inserted: pin 9 connected to Vout, shield connected to neither (doesn't appear to be connected to anything at all).
Hello all. I have strange issue getting I2C communication to work on pins 9 and 10. My testing code is:
The only result I get back is 0 (zero). If I switch to pins 28 and 27 then it works correctly. I have checked the connections are correct several times, have tried with another mbed board (giving the same result), and tried with another I2C temperature sensor with my own interface code (again, same result).
Has anyone else encountered a similar problem, or have any debugging tips?