I want to connect a Wii nunchuck to my Arduino.
Since the Arduino is running at 5V, and the nunchuck at 3.3V, I think I need to convert the SDA/SCL levels. Stepping them down to 3.3V should be relatively straightforward (voltage divider), but how do I make this bidirectional?
I have seen bus transceivers such as the SN74LVC245A, which would do the job, but seem to rely on being told which direction to do the conversion in.
Is this normal? Presumably in my case, I'd tell it A->B for sending, and B->A for receiving, but taking that approach I'd lose another pin.
Is there a better component/schematic for doing this?
Mike: Yes, of course I2C is bidirectional, but my original response was that I understood the SFE product not to be, as it has clearly labelled "input" and "output" pins.
Similarly, I follow that the app note you pointed out does what I need
but my original response was that I understood the SFE product not to be, as it has clearly labelled "input" and "output" pins.
But that sparkfun product will not do what you need, it is simply a logic level converter and as you point out you need more than this on an I2C device.
Can't seem to see your original response just the original post that makes no mention of it.
My first response was to fdufnews, pointing out the SFE board wasn't bidirectional. You haven't posted anything I disagreed with or misunderstood (so I must be learning...).
I'm grateful (as ever) for your sage advice, and will go away and shut up now, as I understand the answer to my original question.
:-[
My first response was to fdufnews, pointing out the SFE board wasn't bidirectional.
The board is bidirectionnal. You should look at the schematic of SFE board. 2 of the channels on the board are the exact application of NXP application note.
No no the 2 channels with FET transistors are bidirectionnal. They are implemented the way NXP describe it in their application note. So can be used for an I²C bus
The hardware I2C lines are supposed to be open-drain in I2C mode - so why not use a version of the Wire library that refrains from turning on the internal pull-ups, and use external 3.3v pullups?