GCLD print speed
Moderator: Benj
-
- Posts: 81
- Joined: Wed Jun 20, 2012 9:59 pm
- Has thanked: 36 times
- Been thanked: 5 times
GCLD print speed
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
Anyone have any idea's
Thanks
- 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
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?
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?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 81
- Joined: Wed Jun 20, 2012 9:59 pm
- Has thanked: 36 times
- Been thanked: 5 times
Re: GCLD print speed
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
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
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
-
- Posts: 81
- Joined: Wed Jun 20, 2012 9:59 pm
- Has thanked: 36 times
- Been thanked: 5 times
Re: GCLD print speed
Hi Enamul
Please find attached the requested screen shot.
Thanks for your help
Tony
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
- 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
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
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
-
- Posts: 81
- Joined: Wed Jun 20, 2012 9:59 pm
- Has thanked: 36 times
- Been thanked: 5 times
Re: GCLD print speed
Hi Enamul
Glad to here my config is correct, thought it would be but nice to have a second opinion
Please find attached the requested FC custom file.
Thanks
Tony
Glad to here my config is correct, thought it would be but nice to have a second opinion

Please find attached the requested FC custom file.
Thanks
Tony
- Attachments
-
- FC5_PIC_Custom.c
- (22.01 KiB) Downloaded 269 times
- 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
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.
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.
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();
}
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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
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
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
-
- Posts: 81
- Joined: Wed Jun 20, 2012 9:59 pm
- Has thanked: 36 times
- Been thanked: 5 times
Re: GCLD print speed
Thanks guys, just one more question, do I remove a nop() from both set bit and clear bit?
Thanks Tony
Thanks Tony
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 81
- Joined: Wed Jun 20, 2012 9:59 pm
- Has thanked: 36 times
- Been thanked: 5 times
Re: GCLD print speed
Thank for advice, will be trying the 20MHz xtal first, hopefully this will solve my problem.
Thanks
Thanks