Newhaven Display Forum

Newhaven Products => TFTs => Topic started by: fagci on January 25, 2015, 01:16:52 PM

Title: ft5316 firmware
Post by: fagci on January 25, 2015, 01:16:52 PM
Hello!
I have ft6316 touchscreen contholler, close to ft5306, but wake pin used as WAKE/INT.
I tried to read/write some data from EEPROM, but no success.

I using arduino pro mini with following code:
Code: [Select]
#include <Wire.h>

#define DEV_ADDR 0x38
#define WAK_PIN 4
#define VCC_PIN 3
#define RST_PIN 2

#define FACTORY_MODE 0x40

void init_device(){
  digitalWrite(RST_PIN, HIGH);
  digitalWrite(VCC_PIN, LOW);
  digitalWrite(WAK_PIN, LOW);
 
  digitalWrite(VCC_PIN, HIGH), delay(100);
  digitalWrite(WAK_PIN, HIGH), delay(100);
  //digitalWrite(RST_PIN, HIGH), delay(100);
}

void test_device(){
  wr(0x00,FACTORY_MODE);
  delay(300);
  for(unsigned char i=0x00; i<0xFF; i++){
    Serial.print(i);
    Serial.print(": ");
    rr(i);
    Serial.println(" ");
  }
}

void setup(){
  Wire.begin();
  Serial.begin(9600);
  pinMode(VCC_PIN, OUTPUT);
  pinMode(RST_PIN, OUTPUT);
  pinMode(WAK_PIN,OUTPUT);
  init_device();
  test_device();
}

void loop(){}

void rr(unsigned char reg) {
  Wire.beginTransmission(DEV_ADDR);
  Wire.write(reg);
  assert(Wire.endTransmission(DEV_ADDR));
  //Wire.beginTransmission(DEV_ADDR);
  Wire.requestFrom(DEV_ADDR, 128);
  while(Wire.available()) Serial.print(Wire.read(),HEX);
  //assert(Wire.endTransmission());
}

void wr(unsigned char reg, unsigned char val) {
  Wire.beginTransmission(DEV_ADDR);
  Wire.write(reg);
  Wire.write(val);
  assert(Wire.endTransmission(DEV_ADDR));
}

void assert(int e){ if(e){ Serial.print("[E");Serial.print(e);Serial.print("]"); } }

And I got only zeroes in any way  :(

Help me please to flash this controller by firmware, which I have..

Datasheet: https://drive.google.com/file/d/0By7QfrffBV76T2o5S2dheGtKdXM/view?usp=sharing

Michael L, probably I have this problem due to improper initialization?
Title: Re: ft5316 firmware
Post by: fagci on January 27, 2015, 12:34:09 PM
Solution:
http://pastebin.com/YFhxnZ2A
Title: Re: ft5316 firmware
Post by: dheeraj on June 29, 2016, 06:49:57 AM
Hello Fagci,

This is Dheeraj Sawant from INDIA,

From couples of days i am working on FT5316, i saw your code which you had post it.
also i saw datasheet of FT5316, but i am stuck on *Firmware file.
Basically i didn't get fw.bin file. please help to get firmware.

Thanks You