GCLD print speed

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Tony Brown
Posts: 81
Joined: Wed Jun 20, 2012 9:59 pm
Has thanked: 36 times
Been thanked: 5 times

GCLD print speed

Post by Tony Brown »

I have got my GLCD to work in flowcode, but when it comes to printing anything on the screen it prints a letter at a time instead of all text instantly.

Anyone have any idea's

Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: GCLD print speed

Post by Benj »

Sounds like your micro is running pretty slowly or may be running at the incorrect speed.

What is your clock speed and have you confirmed the Flowcode clock speed in the project options matches the hardware clock speed by running a simple 1 second flasher test.

Also which gLCD are you using?

Tony Brown
Posts: 81
Joined: Wed Jun 20, 2012 9:59 pm
Has thanked: 36 times
Been thanked: 5 times

Re: GCLD print speed

Post by Tony Brown »

Hi Benj

The GLCD i am using is a "MG1206E 128x64 dot glcd".
I am using a 4MHz xtal and flowcode reflex this, the only thing I found wrong was the setting were on HS instead of XT, which I have now changed but this has changed nothing.

Tony

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times

Re: GCLD print speed

Post by Enamul »

Hi,
Can you please post the screen shot of your config?
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

Tony Brown
Posts: 81
Joined: Wed Jun 20, 2012 9:59 pm
Has thanked: 36 times
Been thanked: 5 times

Re: GCLD print speed

Post by Tony Brown »

Hi Enamul

Please find attached the requested screen shot.

Thanks for your help

Tony
Attachments
config screen shot.pdf
config screen shot
(47.81 KiB) Downloaded 265 times

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times

Re: GCLD print speed

Post by Enamul »

Hi Tony,
Your config seems fine. It might be a code issue in that case. Can you kindly post your FC with custom c code so that we can dig out where it going wrong?
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

Tony Brown
Posts: 81
Joined: Wed Jun 20, 2012 9:59 pm
Has thanked: 36 times
Been thanked: 5 times

Re: GCLD print speed

Post by Tony Brown »

Hi Enamul

Glad to here my config is correct, thought it would be but nice to have a second opinion :D

Please find attached the requested FC custom file.

Thanks

Tony
Attachments
FC5_PIC_Custom.c
(22.01 KiB) Downloaded 269 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: GCLD print speed

Post by Benj »

Hi Tony,

Could the 4MHz crystal be the cause of the problems. Could you switch this for say a 20MHz crystal and get a 5 fold speed increase?

Another alternative which will give you more speed would be to edit this function in the custom C file.

Code: Select all

void MX_LCD_Enable (void)
{
	set_bit(MX_CONTROL_PORT, MX_ENABLE);
	//delay_10us(1);								//Min delay 450ns
	nop();
	nop();
	nop();
	nop();
	nop();

	clear_bit(MX_CONTROL_PORT, MX_ENABLE);
	//delay_10us(1);								//Min delay 1.5us
	nop();
	nop();
	nop();
	nop();
	nop();
}
Simply removing some of the nop(); instructions will allow the program to throw data across to the display faster. I would first investigate upping the crystal value and then once this is working you can try playing around with the number of nop instructions to try and get even more speed.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times

Re: GCLD print speed

Post by Enamul »

Hi Tony,
I have just got option to see the c code and my opinion is same as Ben. If I were you I would try with delays in Enable macro as this is controlling write speed..
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

Tony Brown
Posts: 81
Joined: Wed Jun 20, 2012 9:59 pm
Has thanked: 36 times
Been thanked: 5 times

Re: GCLD print speed

Post by Tony Brown »

Thanks guys, just one more question, do I remove a nop() from both set bit and clear bit?

Thanks Tony

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: GCLD print speed

Post by Benj »

Hi Tony,

I don't think they have to be absolutely identical so you can probably remove from either side without too many ill effects. Best bet is to have a play and see what works.

The thing that will give you the most significant speed increase will be upgrading the crystal so be careful about removing all the nops and then trying with a faster crystal as this probably will require some if not all of the nops to be in place to allow the comms to work.

Tony Brown
Posts: 81
Joined: Wed Jun 20, 2012 9:59 pm
Has thanked: 36 times
Been thanked: 5 times

Re: GCLD print speed

Post by Tony Brown »

Thank for advice, will be trying the 20MHz xtal first, hopefully this will solve my problem.

Thanks

Post Reply