Go Down

Topic: Touch scren EEPROM (Read 177 times) previous topic - next topic

fagci

I have touchscreen EEPROM controller FT5316 with i2c slave mode interface.
According to specification, first I need to send 6bit address, then 7th bit  - r/w flag.
I found simple way to read data from slave device by this code:
Code: [Select]
#include <Wire.h>

void setup()
{
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
}
int i=56;
void loop()
{
  //Serial.print(i);
  //Serial.print(": ");
  Wire.requestFrom(i, 64);    // request 64 bytes from slave device
  int r=0;
  while(Wire.available())    // slave may send less than requested
  {
    r++;
    char c = Wire.read(); // receive a byte as character
    Serial.print(c,HEX);         // print the character
  }
  if(r>0)Serial.println(" ");
  delay(1000);
}


There 56 - address found by iteration over 0..n

And by this code I get only 16bytes, which is zeroes.

Does this real data, or I doing something wrong?

Best regards, Mikhail.

fagci

#1
Jan 12, 2015, 06:47 am Last Edit: Jan 12, 2015, 08:17 am by fagci
Datasheet is here:
http://wenku.baidu.com/view/51ad225c69eae009581becb8.html

I need to dump firmware, and then flash new.

By the way, according to datasheet, voltage range is 2.8-3.6v, mine is 3.48v from cp2102 converter.
I not using pull-up resistor.
If I put RESET to GND, reading has been stopped for this moment. May be controller is live=)

Maybe I need to use same code as http://playground.arduino.cc/Code/I2CEEPROM
to transmit control bits before reading?

fagci

Found https://github.com/adafruit/Adafruit_FT6206_Library/blob/master/Adafruit_FT6206.cpp, device close to mine, but w/r without results..

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy