Need help with FT800 using Gameduino 2 libraries on Teensy 3.6

Status
Not open for further replies.
Here is something to try:


you must set the value in the GD2.ccp file (Line 6):
#define PROTO 1 -> #define PROTO 0
 
Are you feeding it 5v power or 3.3v? If you are feeding it 5v power, you may need to use level shifters to convert the SPI pins (SCLK = 13, MISO = 12, MISO = 11, CS = whatever) from 3.3v to 5v.
 
Are you feeding it 5v power or 3.3v? If you are feeding it 5v power, you may need to use level shifters to convert the SPI pins (SCLK = 13, MISO = 12, MISO = 11, CS = whatever) from 3.3v to 5v.

Their connector only has a pin for DC-5V, but they are using an XC6209 to regulate it down to 3.3V for everything that needs that, while still having 5V to power the LCD backlight. I grabbed 5V from VUSB, I think.

I was thinking that, since the FT800 is a 3.3V part that I wouldn't need to do any level conversion. But, I notice that their schematic is using 74LCX125 quad buffers to make their device 5V tolerant. Looking at the datasheet VIH and VIL suggests to me that it should still work with 3.3v inputs, but I'm a bit inexperienced in such things, so perhaps I am reading it wrong?

I also notice that they are using 47K pull up and pull down resistors on certain pins, but those are after the quad buffer level shifters, and IIRC 47k is consistent with 3.3v operation.

So, I guess my answer is "I don't think I need that, and I'm not sure how to test whether I do."
 
#include <EEPROM.h>
#include <SPI.h>
#include <GD2.h>

void setup()
{
pinMode(4, OUTPUT); // FT800 Power Down (reset) input


digitalWrite(4, HIGH); // Set PD# high to start
delay(20);
SPI.setMOSI(7); // Audio shield has MOSI on pin 7
SPI.setSCK(14); // Audio shield has SCK on pin 14
GD.begin();
}

void loop()
{
GD.Clear();
GD.Begin(POINTS);
for (int i = 0; i < 100; i++) {
GD.PointSize(GD.random(16 * 50));
GD.ColorRGB(GD.random(256),
GD.random(256),
GD.random(256));
GD.ColorA(GD.random(256));
GD.Vertex2ii(GD.random(480), GD.random(272));
}
GD.swap();
}
Code:

I had this code running on that display two years ago, dropped it because I could not get touch input to work. You must also #define PROTO 0 .
 
I spent a few hours playing with the HotMCU FT811's I bought a few months back and got one running on a T3.1.

Code:
//#include <EEPROM.h>
#include <SPI.h>
#include <GD2.h>
#define PDNPin 8
void setup()
{

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(0x000000);
GD.Clear();
GD.cmd_text(GD.w / 2, GD.h / 2, 31, OPT_CENTER, "Hello world");
GD.swap();
delay(19);
}

It appears that Toggling the PD pin is needed most of the time to get things rolling. Also I placed a delay in the code after noticing that if you update close to or faster then 60Hz the code will pause and wait for the previous update to finish.

They don't seem to like to wake up after flashing new code all the time so you tend to need to cycle power on the whole setup. Many of the examples require an SD card since they are created for the Gameduino hardware, without the SDcard the code just locks up when it gets to that point.

Also depending on what hardware you have you may need a different version of the Gameduino library, there is a few versions in the wild for specific setups and the CS pin can be different from one version to another.
 
My GD2 library didn't have a GD.w or GD.h value, so I hardcoded 480 and 272 in respectively and got it to run.
It displays "Hello world" and then a few seconds later the screen gets a strange grid on it and slowly turns white.

I got my library from the excamera Gameduino 2 site at (http://excamera.com/sphinx/gameduino2/code.html). Where did you get yours?
 
The stock library should have that since that's where that example comes from. There are other libraries out there with optimizations for Teensy, but you can run several stock examples without the SD Card. Try changing GD.begin(); to 0 - 3. You may find one option works better then the rest or you can leave it blank and it will hopefully auto detect the hardware.

Here is a link to where I got a GD library with several optimizations and some nice examples if you browse the entire thread. One thing to remember is the Teensy is much faster so you may have to add a delay in the loop to slow the Teensy down, the FT8 series are only good up to 60Hz. Any faster and you start getting odd behavior and flickering.
 
Status
Not open for further replies.
Back
Top