-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to config the resolutions. #1
Comments
Hi, try to call readInfo(), obtain GTInfo struct and check resolutions that chip use. |
Hi, thank you for your answer, my touch screen is 800x480, how to set the resolutions? |
What resolution You receive from chip in GTInfo? |
received 1024x600 from GTInfo |
i use touch.loop(), when touched, i received the result as below: |
Oh, it's problem in code on gitHub, it was early prototype version and incorrect read data from registers. |
ok, i will check it, thanks for your support. |
Commit changes, but can't check on hardware right now, can't find FPC bread-board. |
sorry for this late reply, i have rechecked, but there has some issue about compiling: Build options changed, rebuilding all |
i changed the log printf to Serial.print, now i get the right result: looks like the resolution was 1024*600. thank you very much for your help! |
You should write config to chip (GoodixFW.h an example from linux driver), config structure described in GTConfig, xResolution and yResolution is what You need. touch.write(GOODIX_REG_CONFIG_DATA, g911xFW, sizeof(g911xFW)); As I remember, last byte of config is checksum, which calculated like this: void checksum() { // buf here is config uint8_t ccsum=0; uint8_t cbuf[1]; Serial.println(); I don't remember tat my checksum works correctly, so check it :) |
I use https://github.com/hadess/gt9xx/blob/master/specifications/GT928%20Datashet%20English.pdf |
sorry, i dont understand, |
"just need this function to write the config data to clip, right?" It will be good to save Your current config from chip. You can do it using touch.read starting from GOODIX_REG_CONFIG_DATA (0x8047) register to 0x80FF register. GTConfig describes content of g911xFW array uint8_t configVersion = 0x42; touch.write - write data to chip registers, starting from GOODIX_REG_CONFIG_DATA (0x8047) register number. |
thank you, the checksum result is D5 so.. right? then i use touch.write(GOODIX_REG_CONFIG_DATA, g911xFW, sizeof(g911xFW)); |
Maybe checksum is incorrect, can check it after work, try to recalculate cs from existing chip config and compare with written in cs register to understand is it cs problem or other. Also I can try to check after work. |
is it possible that the write() have problem? |
Possible. Try to change in uint8_t Goodix::write(uint16_t reg, uint8_t *buf, size_t len) |
while (startPos<len) { i have changed and retest it. but there has no error return. |
Does it works now? Change to return error |
sorry! no. also can not write the config. i try to write a single config, also not success. |
Can You write here config that You read from chip in hex? With checksum from 80FF register. |
yes, i also try to write this config from read chip. |
I found FPC adapter so can check now. Write dump of config from Your chip here please. |
You can use this for debug: void dumpRegs(uint16_t first, uint16_t last) { uint8_t res = touch.read(first, buf, len); Serial.print("0x"); |
Just call dumpRegs(0x8047, 0x8100); |
thats great, but im sorry, because now is 1:20am . i was out of my office. but can u write the config success with ur touch panel? |
Check now. An example of config dump from my lenovo tab touch. |
Works, chip save config in internal memory, maybe you forgot set 0x8100 to 1 on config write. Also add some methods for write new resolution to chip config, You can use it as reference for making config changes. |
thanks for your patience! i try to write, but also no change! void setup() { Wire.setClock(400000); |
Looks normal, should work. |
its 911.
|
Hello, I also have this problem. I cannot write any registes of the GT911. Even the registers that are outsider the configuration range of addresses. Another weird thing is that register 0x8047 is equal to 95 (correspondig to ASCII "_") while the maximum available value should be 90 (corresponding to ASCII "Z"). Does anyone know what the issue may be?? Thanks. |
This is a problem with the wire library in arduino. Internal data buffer for more than 32 bytes |
You need to use the twi.c library |
Hi Ellion270 I am trying to compile this for for Arduino Mega 2560 and I get error. Are you saying that wire library should not be used? Where can I get twi.c ? Thanks |
Hi, thanks for your code, when i run with my TP, but the X/Y point was inaccuracy, how to config it?
thank you.
The text was updated successfully, but these errors were encountered: