Bienvenido a los foros de FT81x Manía. Te invitamos a regístrate totalmente gratis. Disfruta de tu experiencia con un grandes amigos y Staff.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Thread Contributor: raufjaySome example derived from James Bowman's book

#1
3
Better response on post Some example derived from James Bowman
#include<GD2UB.h>
#define NBLOBS 128
#define OFFSCREEN -16384

String inst;

struct ab {
int x, y;
} blobs[NBLOBS];


void setup()
{
GD.begin();
for (int i = 0; i < NBLOBS; i++) {
blobs[i].x = OFFSCREEN;
blobs[i].y = OFFSCREEN;
}
}


void loop()
{
static byte blob_i;
GD.get_inputs();
if (GD.inputs.x != -32768)
 { blobs[blob_i].x = GD.inputs.x << 4;
   blobs[blob_i].y = GD.inputs.y << 4;
   inst = "";
 }
 else
   {inst="Touch the Screen";
    blobs[blob_i].x = OFFSCREEN;
    blobs[blob_i].y = OFFSCREEN;
   }
   
 blob_i = (blob_i + 1) & (NBLOBS - 1);
 GD.ClearColorRGB(0x000000);//e0e0e0);
 GD.Clear();
   GD.SaveContext();
   GD.ColorRGB(0xff8000);
   char txt[20];
   inst.toCharArray(txt,17);
   GD.cmd_text(100,30,30,0,txt); //"Touch on the screen");
   GD.RestoreContext();
 GD.Begin(POINTS);

 for (int i = 0; i < NBLOBS; i++)
 { GD.ColorA(i << 1);                          // Blobs fade away and swell as they age
   GD.PointSize((1024 + 16) - (i << 3));
   uint8_t j = (blob_i + i) & (NBLOBS - 1);    // Random color for each blob, keyed from (blob_i + i)
   byte r = j * 17;
   byte g = j * 23;
   byte b = j * 147;
   GD.ColorRGB(r, g, b);
   GD.Vertex2f(blobs[j].x, blobs[j].y);        // Draw it!
 }
GD.swap();
}
Reply
#2
2
It is good to know that your TFT is running.

This is my setup:
?mage
Left: FT801 4.3"+Teensy 3.6        Right: FT813 5"+F429ZI-DISCO
Reply
#3
0
        Yes, my LCD is working. But I am still struggling with many issues. I am putting them down here, perhaps you can help/guide me to the point.

a) I have problem in to get the SDRAM interface. I have one external MicroSD card reader. It uses the same SPI as FT811. FT811 does not like it. The screen does not show up any thing if this SDCard reader is sharing the SPI.

2) I am also struggling with Polar command. I want to have a dial like in attached screen. I could not find out how to have ticks on the border of dial.

3) Loading image is also a dream yet. However, once I could get my SDCard interface in place I could try to load some image.

Many Thanks.

Rauf
Reply
#4
1
1. Your reader don't work like external reader. Must be like this:

?mage

SD reader

2. The bus SPI for the TFT must be SPI1, for the external reader must be SPI2.

Check the SPI2 pins for your STM32 board. Could it be:

PB15   MOSI
PB14   MISO
PB13    SCK
PB12     CS
Reply
#5
1
My setup-test

?mage

?mage

STM32F103C8 + FT801 4.3" Riverdi  (SPI1)
EEPROM of DS3231 to store the calibration vector
MicroSD 3.3V      (SPI2)


Attached Files
.zip   SD_Examples.zip (Size: 826.64 KB / Downloads: 1)
Reply
#6
0
Thank you for showing the pictures and sending the example code. I am using controllers flash memory to keep the calibration vector data. And not using EEPROM. I hope that does not make any difference.
I have ordered another SDCard board without 74125 level shifter and 3.3v regulator. I will try this code.
Thanks
Reply
#7
2
Hello,
I tried your SDExamples. They worked out with success. I used the same SDcard board with 74125 level shifter, but on SPI_2 of STM32F103.
Many thanks.
Rauf

   



   
Reply
#8
1
Wow!.
Never I figured that SD breakout 5V/3.3V could be work it!!!. Congratulations. Your TFT has reached a new level!  Angry

PD: I need made much more experiments!. You must be think in F407VE, the F103 very soon it will fall short!
Reply
#9
0
I placed the order for F407VE board. Waiting for its arrival.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)