I'm trying to get working an i2c lcd display borrowed from a wireless phone. The problem is that I has not any technical info about it. The only thing I know is the pins for vss, vdd, sda and scl.
Is there any way to scan the i2c bus in order to figure out what addresses must be used?
Or... is there any way to create a small analyzer? I can connect the display to the phone and connect some pins of arduino. Is there any way to analyze the info using the wire library or I must create a custom program for this?
If you have one such LCD that is still in its original usage (i.e., still in the phone), then Grumpy's suggestion to watch the conversations with an oscilloscope makes sense.
If you can't watch the LCDphone talk in a functional circuit, it's going to be pretty hard to figure out what the conversations should consist of. The protocol might be any number of bits or bytes to address the LCD in any number of ways: character-wise, pixel-wise, linesegment-wise, etc.
The analogy is that while a doctor can see your vocal cords, she can't quite figure out what language you speak unless she can observe you speaking.
You don't need an LCD. Just gather the bits on the arduino and pass the lot over to processing to do a display / analysis.
You can arrange the arduino to sample the state of the data line on each transition of the I2C clock and data line. Then time stamp the sample (that is record what millis() gives you). That way you get to capture activity when it happens and you can analyse it.
Grumpy, my point (and I think you're on the same page) is that you need the phone to know how the phone controls the LCD. The LCD probably doesn't talk back to the phone at all, but your investigation strategy seems to be "watch the communication." My worry was that anv here has an LCD to study, but no actual phone to help the investigation. (Though he says he can do that if required.)
I do have the phone, then I can monitor the communication. I am suposing it is i2c, then the first thing I need to know is what is the address. With this, I supose I can use try-and-error to figure out the communication.
Then... will try to make a little protocol analyzer. One question: Is there any way to use the wire library to monitor the i2c bus? Something like promiscuous mode or something? or I will need to write a little program for this?
By the way... ¿How do I upload an image to the forum?
Is there any way to use the wire library to monitor the i2c bus?
No the library is an I2C master, at best you need an I2C slave, but more than this you need an I2C spy. That is one that doesn't change the data line at all.
How do I upload an image to the forum?
Press the picture icon (3rd from the left at the top) and paste the URL between what it pops up.