Page 1 of 1

gLCD EB0058 Board and FCv5, speed

Posted: Wed May 23, 2012 12:15 pm
by Mark
Hi,

When using Flowcode 4 with the gLCD I recall it running quite fast under software control at high CPU clock speeds.

Looking through the code for the component with Flowcode 5 I cannot spot how to alter the underlying speed of the communications.
How can I tinker with this to see if I can speed things up when under software control?

My specific application is with the gLCD on Formula Flowcode where the display ran pretty quickly under Flowcode 4.
For completeness, the application uses the tweaks to the interface I/O lines as shown on the Formula Flowcode Forum,
however I am posting here as it should be of more general interest.

Thanks in advance,

Mark

Re: gLCD EB0058 Board and FCv5, speed

Posted: Wed May 23, 2012 2:09 pm
by Benj
Hello Mark,

If you look in the following directory "Flowcode\v5\CAL\PIC" and then open the following file in a text editor "PIC_CAL_SPI.c"

Then find the function named like this "CALFUNCTION(MX_UINT8, FC_CAL_SPI_Master_Byte_, (MX_UINT8 DataOut))"

Inside the function are two lines that insert software delays into the SPI byte transaction.

Code: Select all

delay_us(SPI_SW_DELAY);
Edit both the lines so that the delay is commented out.

Code: Select all

//delay_us(SPI_SW_DELAY);
This should give you slightly better performance out of the EB057/58 gLCD in SW mode.

Remember to take a backup copy of the file first so you can go back if you need to use software SPI with anything else.

Let me know how you get on.

Re: gLCD EB0058 Board and FCv5, speed

Posted: Fri May 25, 2012 9:58 pm
by Mark
Ben,

Great, this makes the display fast and responsive.
The text scrolls out quickly enough to avoid waiting
and the clear screen is fast enough not to be tiresome.

Many thanks,

Mark