How to display many tiles on the screen

FTDI/Bridgetek EVE2 & EVE3 & EVE4 SPI TFT Series by Matrix Orbital

Moderator: Mods

Post Reply
Zoran
LCD?
Posts: 1
Joined: Thu Dec 22, 2022 7:44 am

How to display many tiles on the screen

Post by Zoran »

Hi All

I have connected Gameduino 2 display to stm32f407 discovery board.
I am able to write text and bitmaps on the display, but I experience issue when trying to add more than 3 bitmaps at the time.
After some try and error it seems that I need to add some delay between each of the commands in the command list, otherwise nothing would
be displayed.

My plan is to try to make video game, and I am thinking on creating the background picture by using some tiles.

I have used EVE Asset Builder tool to convert 16x16.png file to an array and thereafter I have included array in my program and uploaded it to GRAM.
SPI connection on the discovery board is configured to 8MHz.

Bellow is example of the program which I have shortened in this case, but in reality I am sending many more BITMAP_SOURCE and VERTEX2F commands:
My impression is following, the more BITMAP_SOURCE and VERTEX2F commands I include in DrawBitmap3() function, the more delay I need to add in between.

Probably there is some other way to do this but I have not understand it yet.

I have attached 2 pictures. One is the tilemap which is converted to an array and another is how my display looks so far.

I hope that somebody might have some good suggestions on how this could be done.

Thanks in advance.

Code: Select all

void DrawBitmap3()
{
	API_LIB_WriteDataRAMG(Tiles16x67, 34304, 0);
	delay3();

	cmd(CMD_DLSTART);



	cmd(BITMAP_HANDLE(0));
	cmd(BITMAP_SOURCE(0));
	cmd(BITMAP_LAYOUT(ARGB1555, 32, 16));
	cmd(BITMAP_SIZE(NEAREST, BORDER, BORDER, 16,1072));

	cmd(CLEAR_COLOR_RGB(0,0,0));
	cmd(CLEAR(1,1,1));

	cmd(BEGIN(BITMAPS));

	cmd(BITMAP_SOURCE(14336));
	cmd(VERTEX2F(0, 0));

	cmd(BITMAP_SOURCE(14848));
	cmd(VERTEX2F(256, 0));

	delay3();
	cmd(BITMAP_SOURCE(15360));
	cmd(VERTEX2F(512, 0));

	delay3();
	cmd(BITMAP_SOURCE(15872));
	cmd(VERTEX2F(0, 256));

	delay3();
	cmd(BITMAP_SOURCE(16384));
	cmd(VERTEX2F(256, 256));

	delay3();
	cmd(BITMAP_SOURCE(16896));
	cmd(VERTEX2F(512, 256));

	delay3();
	cmd(BITMAP_SOURCE(17408));
	cmd(VERTEX2F(0, 512));

	.
	.
	.
	.

	delay3();
	delay3();
	cmd(BITMAP_SOURCE(15360));
	cmd(VERTEX2F(3840, 3328));

	delay3();
	delay3();
	cmd(BITMAP_SOURCE(17408));
	cmd(VERTEX2F(3584, 3584));

	.
	.
	.
	delay3();
	delay3();
	delay3();
	cmd(BITMAP_SOURCE(17920));
	cmd(VERTEX2F(4352, 3840));

	delay3();
	delay3();
	delay3();
	cmd(BITMAP_SOURCE(18432));
	cmd(VERTEX2F(4608, 3840));

	cmd(END());



	cmd(DISPLAY());
	cmd(CMD_SWAP);

}
Attachments
20221222_111857.jpg
20221222_111857.jpg (1.63 MiB) Viewed 5249 times
16x16.png
16x16.png (5.23 KiB) Viewed 5249 times

Raquel
Matrix Orbital
Matrix Orbital
Posts: 805
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Re: How to display many tiles on the screen

Post by Raquel »

Hello Zoran,

Thank you for contacting Matrix Orbital technical support.

I will forward your question to my colleague, and update you when I have the information.
In the mean time can I please get the serial number on your EVE unit?
It's a small clear sticker with format xxMxx-xxxx.

Thank you,
Raquel
Raquel Malinis
Design and Development
Matrix Orbital

Post Reply