Hello,
I've been trying to find what's wrong but no luck. Here is the situation.
I have this display: link to buydisplay.com
It is the version with a capacitive touch screen (ILI9341 controller with FT6206 touch controller).
Problem:
I want communicate with FT6206 through I2C protocol but when I read a register of it I always get the response 255.
The wiring must be correct. I'm using Arduino Due (SDA 20 , SCL 21). And I connect these to the displays SDA, SCL pins.
I am using adafruit's library: library
I am trying to run the example, but it fails on ctp.begin(40) example
I uncommented the debug serial prints here adafruit_FT6206.cpp
Every call such as this returns 255: readRegister8(FT6206_REG_VENDID).
First I thought the problem is the I2C address. I am still not sure if it is a problem or not. The thing is that there is an example code at buydisplay.com. And in that code it shows 2 addresses:
#define WRITE_ADD 0x70
#define READ_ADD 0x71
In the FT6206 datasheet it also talks about the last READ/WRITE bit: FT6206 - Page 4
So this is the 8-bit addressing..I guess.
But the Wire.h that is used by the adafruit library uses 7-bit adressing. So on the top of Adafruit_FT6206 it only says
#define FT6206_ADDR 0x38
This is the shifted address. 0111 000(0/1) --> 00111000. This page also mentions 0x38 I2C address table
Question. Is this cool? The datasheet says it needs the last bit, but we don't provide it. Should it work like that, with 0x38? I found this: link, on the bottom it says that this is cool because the last bit will be added automatically. Although I cannot see anything like that in the wire.cpp, wire.h, twi.c or twi.cpp
Okay so if it is not the address then what?
I also found this thread: due i2c not working thread people talking about I2C not working properly on DUE.
Noo, don't want to believe that!
BTW I have Arduino 1.6.9 installed. So it is the newest.
So any ideas? What can I do? I will try this I2C scanner thing shortly, but don't have high exceptations.
Thanks,
Levente