|
Post by ED on Oct 15, 2017 14:18:28 GMT -8
Hi folks, I would really appreciate some help with this. I got this FT800 display from HotMCU www.hotmcu.com/5-graphical-lcd-touchscreen-480x272-spi-ft800-p-124.htmlI am trying to get it working with GameDuino and teensy 3.1 For a moment I did have it working with the FTDI drivers but could never get the touch to work screen would just display white with any code that included a touch driver. Also LED on teensy would light solid. With non touch code "Hello World" LED on teensy would flicker very dimly as if CLOCK was working on D13 Anyway I would love someone to help me with example startup code preferably with a working touch example using the GD2 library and this screen. I am not sure what to change in the library itself and also not completely sure about strobing the PD pin manually. So far everything I have tried just produces a blank black screen no sign of life. Orange LED is lit solid. Here is what I have for wiring. Teensy Display GND GND D12 MISO D10 CS D8 PD 5V 5V D13 SCK D11 MOSI
I have the INT pin on the display floating, unconnected. I am usin the ribbon that came with the display and then short wires to the teensy.
Here is the code I have been trying to use however a clear working example with touch would be very helpful...
#include <EEPROM.h>
#include <SPI.h>
#include <GD2.h>
#define PDNPin 8 void setup(){
pinMode(PDNPin, OUTPUT);
digitalWrite(PDNPin, HIGH); // INICIALMENTE EN ALTO
delay(20);
digitalWrite(PDNPin, LOW); // REALIZAMOS EL POR EN BAJO AL PIN DN
delay(20); // ESPAREMOS 20 MICROSEGUNDOS (Data pone 5ms)
digitalWrite(PDNPin, HIGH); // LO VOLVEMOS A PONER EN ALTO
delay(20);
GD.begin(3);
GD.wr(REG_SWIZZLE, 0); // PARA NO INVERTIR EL ROJO POR AZUL DE LA PANTALLA
}
void loop()
{
GD.ClearColorRGB(0xff0000); // LA PANTALLA DE FONDO ROJO
GD.Clear();
GD.cmd_text(GD.w / 1, GD.h / 2, 31, OPT_CENTER, "HOLA TOMAS F.");
GD.swap();
}
void loop()
{
GD.ClearColorRGB(0xff0000); // LA PANTALLA DE FONDO ROJO
GD.Clear();
GD.cmd_text(GD.w / 1, GD.h / 2, 31, OPT_CENTER, "HOLA TOMAS F.");
GD.swap();
}
thanks for any and all help, I am pretty sure its possible to run this display with the teensy however I have not struck on the right combination yet and I have been trying for quite a while now. What is the magic please!
Let me know if you need more info Eric
PS Arduino IDE 1.8.0
|
|
|
Post by lightcalamar on Oct 16, 2017 3:18:45 GMT -8
Hi ED.
Can you put the link of the library you are using? It would have to look in detail and know how to determine the problem is hardware or software.
Greetings.
|
|
|
Post by ED on Oct 16, 2017 5:01:58 GMT -8
Thanks so much for getting back with me. You are the person whose posts inspired me to keep trying to get this working!!! Here is a link to the library I am trying to use. github.com/jamesbowman/gd2-liband with 1.8.0 Arduino IDE and a teensy 3.1 I have tried adding proto to the header file and tried to change which screen the header file was using. I feel like I am stumbling around in the dark flipping switches in a random order and hoping for light. At the moment I deleted the library and reinstalled fresh so I know everything is reset back to the beggining. thanks for your help, Eric PS just to ease my mind have you ever gotten touch sensitivity to work with this display and a teensy? I saw a comparison video your group published but you are building your own library??? www.youtube.com/watch?v=r9N1l_w2_RE
|
|
|
Post by lightcalamar on Oct 16, 2017 8:15:50 GMT -8
Hi Eric A few days ago my friend tftlcdcyg introduced a library only for Teensy of which I am part of the team. It is from the line of the library that we have modified for STM32 processors and with all screens with chip FTDI (FT8xx). If you want you can use it and test if it works for your screen this be the friend link; Library for Tennsy GD2SDIO
|
|
|
Post by jamesbowman on Oct 16, 2017 11:16:27 GMT -8
Hi Ed, Yes, Teensy is supported directly by the standard library -- along with Arduino and ESP8266. For getting things working, I always start with "helloworld". I think that for Teensy you must remove "EEPROM.h" at the start of the file. Here's my hookup: 13 SCK (yellow) 12 MISO (green) 11 MOSI (red) 8 CS (blue)
|
|
|
Post by ED on Oct 16, 2017 11:21:26 GMT -8
Ok thanks for the link and I would give a try but I have two questions. I see have this written.
PS: this is the first version, there must be an extra modification in the library to work smoothly with HotMCU screens
I have the HotMCU FT800 display so I may need the extra modification. and also, Do you wire anything up to the PD pin? I don't see it in the pinout?
thanks again, Eric
|
|
|
Post by jamesbowman on Oct 16, 2017 11:27:28 GMT -8
It actually should work with the hotMCU FT800 screen - it will detect it just fine.
For now, you can hook PD up to 3.3v (Vdd), so it's always high.
I'm just trying out the library now to check.
|
|
|
Post by ED on Oct 16, 2017 11:45:11 GMT -8
Thanks for the input James. I switched my wiring to match yours CS on pin 8 I also put my PD pin on pin 9
I deleted the eeprom.h and tried this basic hello world. library is stock...
pinMode(PDNPin, OUTPUT); digitalWrite(PDNPin, HIGH); // INICIALMENTE EN ALTO delay(20); digitalWrite(PDNPin, LOW); // REALIZAMOS EL POR EN BAJO AL PIN DN delay(20); // ESPAREMOS 20 MICROSEGUNDOS (Data pone 5ms) digitalWrite(PDNPin, HIGH); // LO VOLVEMOS A PONER EN ALTO delay(20);
and guess what!!!! it almost works. I see Hello world static for a moment then slowly fades to white so that all I see is white. For a second it looks like you get some other colors first like blue and yellow but it just fades to white. Please note that my int pin is still floating.
any other suggestions??? at least I saw something for an instant first time that's happened since I have been playing with this library so THANK YOU!!!!
also in your photo what is the brown wire?
|
|
|
Post by jamesbowman on Oct 16, 2017 15:26:20 GMT -8
Mine runs as well.
The brown wire is for the sdcard - but there is no sdcard the hotMCU.
Maybe try leaving PDNPin HIGH all the time - no reset?
|
|
|
Post by ED on Oct 17, 2017 4:45:17 GMT -8
Thanks again for James,
I appreciate you taking the time to help me. I have just a couple of more questions hopefully, as I am still having problems.
Are you using your stock library found here with no changes/selections/additions etc...? github.com/jamesbowman/gd2-lib
and are you running the FT800 screen off of 5V or 3.3V right now I am hooked to 5V as the board is asking on the silk screen for that voltage but possibly since teensy is 3.3V thats the problem. I noticed on LightCalamars link page they suggest 3.3V
I did not move my PD pin to 3.3V but did change the script so that it outputs high to that pin only with no reset. Its very inconsistent probably every third time I restart I get the flash of white then black display and Hello World. Then always fades away to white. The interesting piece to me is that the only scripts that worked with FTDI library were the non touch and they always left the LED on the teensy flickering dim like it was communicating. The touch ones did the same thing I am seeing with your library. Faded to white and the LED is solid on the TEENSY like nothing is happening or its locked up other...
any easy way to remove touch from your library to see if that's issue?
thanks again for your time, Eric
|
|
|
Post by ED on Oct 17, 2017 5:28:35 GMT -8
I realize I did not paste my whole code in above. Just so we are all on the same page here is what I am trying to use... Possibly a problem with GD.begin(0) ? I have removed the #include <EEPROM.h> as well #include <SPI.h> #include <GD2.h> #define PDNPin 9 void setup() { Serial.begin(1000000); pinMode(PDNPin, OUTPUT); digitalWrite(PDNPin, HIGH); delay(20); digitalWrite(PDNPin, LOW); delay(20); digitalWrite(PDNPin, HIGH); delay(20); GD.begin(0); } void loop() { GD.ClearColorRGB(0x103000); GD.Clear(); GD.cmd_text(GD.w / 2, GD.h / 2, 31, OPT_CENTER, "Hello world"); GD.swap(); }
|
|
|
Post by ED on Oct 17, 2017 7:16:21 GMT -8
OK GREAT NEWS!!! I switched the power to 3.3V and changed the GD.begin(0) GD.begin(3) and it works mostly The first time it came up it gave me a calibration dot sequence and I touched them all in order and after that first calibration sequence it has not asked me to recalibrate again. I have no idea why that is but it seems to work. I have loaded the simon example and preforming the above changes and the PD Reset sequence it works also. Touch is working SWEEEEEET!!!! the only little issue and its actually kind of a big one is after a random time the whole thing just glitches and I get the white screen again. Unplugging and replugging the USB resets and its fine again. any clues? All I can guess is wire length or the floating int pin. I have really been around the block with this guy and I think really the whole time it was probably because the logic was at 3.3V and the power was at 5V thanks again so much for your help, Eric and for the record the LED is still looking solid even when it is working now on the Teensy!!!
|
|
|
Post by jamesbowman on Oct 17, 2017 11:06:15 GMT -8
That is good news. The floating int pin should not make a difference to anything.
So maybe wire length is the issue?
|
|
|
Post by ED on Oct 18, 2017 16:00:23 GMT -8
I shortened the wires but still getting a little glitch every once in a while that locks it up. I think it may be because I am running the screen now off of the 3.3V supply from the Teensy. In this case I have a 3.1 with 100mA max load on the 3.3V regulator. I am going to try upgrading to the Teensy 3.2 200mA max and see how that does.
Regardless I am worlds ahead of where I was just a couple of days ago and I really appreciate your help!!!
I will report back once I get things changed out but it will be a couple of days, have to attend to some other stuff...
thanks again, Eric
|
|
|
Post by ED on Oct 24, 2017 6:12:10 GMT -8
OK, I have had time to look at this further. Teensy 3.2 did not make a difference. What does seem to make a difference is refresh rate. If I try to refresh quickly I get the whitewash effect and everything freezes up. Anything faster than about 1/3 of a second seems to eventually produce the failure. Longer refresh times of say 1 second or more go for hours without glitching. Once the screen glitches it seems to be locked. If I was running a sketch that has no touch while the refresh is slow and the display is working the Teensy LED only flickers briefly during communication. After the glitch the LED is on solid and the screen is locked up, the only thing that resets at this point is a power cycle. Must be something to do with the communication to the display or the clock itself. Its an interesting problem but I wish it would go away
|
|