Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] Increase SPI TFT display speed

Status
Not open for further replies.

Montassar Ghanmy

Junior Member level 2
Joined
Feb 17, 2015
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
159
Hi there , thank you for taking a look at my thread.
The question is "Does increasing the SPI Frequency Increase the TFT Bitmap loading speed ? ". I have my bitmap stored within an array and it works fine but the loading of the image takes about 2 secs.
Is it also possible if I would change the algorithm which I'm currently using: it's a loop that fills a pixel , then jumps to the next one, something like this:
Code:
for(int Y = 0; Y < 128; Y++) {
for(int X = 0; X < 128; X++) {
int currentPosition = X + Y * 128
writePixel(X,Y,bitmap[currentPosition]);
}
}
By the way I'm using a Cortex M4.
Thank you !!!!! :thumbsup:
 

Use winows filling method.
Just an example:
Code:
void ILI9340_DrawPic16 (unsigned int x0, unsigned int y0, unsigned int SizeX, unsigned int SizeY, unsigned int * Pic)
{
	unsigned long Cnt = SizeX * SizeY;
	ILI9340_SetAddrWindow(x0, y0, x0 + SizeX, y0 + SizeY);
  GPIO_SetBits(LCD_DC);
	GPIO_ResetBits(LCD_CS);
	while (Cnt--)
	{
		  SPI_SendByte(LCD_SPI, * Pic >> 8);
			SPI_SendByte(LCD_SPI, (char)* Pic++);
	}
	GPIO_SetBits(LCD_CS);
}
 
Hi there , thankx for replying. Based on what you advice and what I have here, I made something like this:
Code:
	int Cnt = 128 * 128;
	int i = 1;
	SetAddrWindow(0,0,128,128);
	while (Cnt--) {
		writeData16(mainscreen[i]);
		i++;
	}
But I got 2 small issues:
-The image is rotated now , like in landscape instead of vertically showing up, any ideas how can I rotate it back ?
-The speed has significantly increase and the loading time is less but how can I make it even less. I want to display like 10fps ? or even 5fps ?
Thank you again !!!:thumbsup:
 

128 х 128 х 16bit x 10fps = 2621440 Hz SPI Clock. You can expect for 30+fps even.
Rotating in RAM or sort data during sending, but it will increase cpu load and affect to refresh rate.
Do you have a 32k RAM free for image processing?
 
Definitely I have 32K RAM free but how so I sort the data during sending or within the RAM exactly in code please , thank you.
BTW is the TFT controller okay with what's so ever the SPI frequency is ?
 

Any code example please on how can i get that to happen ? That would be amazing ! It's because i can't figure it out on my own.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top