Page 1 of 1
Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 9:47 am
by anormal
Hello, so, there's my problem :
(Sorry for the bad english)
I used to work on the pic 16F877A and everything worked. But there wasn't enough space so i chose the 18F4520 to work with because it has more space and basically the same pins.
My project need a SD card, a GPS, a gLCD, but i had issues about the SD card. So i upgraded the version to 5.5.2.1 and now the SD card work BUT the gLCD doesn't.
So the real problem now is that the gLCD (EB076, we only have this one, the others are down) print the message "4D Systems bla bla bla" and nothing about our program. I took the test program of matrix multimedia and nothing happened. I tested on the 16f877a with the lastest version and it works. But not on the 18F4520. So anyone knows how to program a gLCD on this PIC? Or knows a PIC similary which can be programmed like the 16f877a and has a great memory ?
Thank you for the help.

Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 10:14 am
by DavidA
Hi,
The Eb076 should work fine on that chip, it does use the UART so make sure that you have the E-block on the correct port for that chip.
Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 10:15 am
by anormal
I tried on the port C and D, with and without software mode, changing the jumpers, A, B, Patch mode, nothing works :/
Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 10:33 am
by anormal
Even our teacher doesn't know how to solve this problem.
This is a project that counts for the high school diploma so ... it's important

Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 10:42 am
by dazz
Hi
Can you disable the following in config, watchdog timer and extended cpu enable then try again
Regards
Dazz
Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 10:59 am
by anormal
It seems to work !!!
Thank you, i'll tell you if i have any others problems

Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 11:07 am
by anormal
In fact, it doesn't work with the program i just made. And if i try to put in the test program, it doesn't work too.
It's driving me crazy
I tried with the test program, it worked. I made a program "gLCD init, gLCD clear, while 1, gLCD Draw box 10,10,100,100,0,255;"
Didn't work, and if i try to put the test program in the PIC again, it doesn't work ><
I think it's about the version but maybe i'm wrong
Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 11:45 am
by anormal
Ok, here's what i found :
Configs :
Oscillator : HS
Fail safe clock : Disable
Internal External : Disable
Power up : Disable
Brown out disable : control SBOREN
Brown out Voltage : 2.0 V
Watchdog timer : Disable
Watchdog postscaler : 1:32768
CCP2 MUX : RB3
PORT B A/D Enable : bla bla "as An"
Low power timer 1 : Enable
Master clear : First Enable, Second Disable
Stack Overflow Disable
And all the rest of the configs below this are disabled.
It works for me now. Thank you.

Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 2:23 pm
by dazz
Hi
Thanks for letting us know, most times something stops working its in the config somewhere
Re: Issues about the glcd on flowcode.
Posted: Thu Mar 21, 2013 4:13 pm
by DavidA
Indeed, the test files are designed for one chip only (16F887A in 90% of cases).
Re: Issues about the glcd on flowcode.
Posted: Tue Mar 26, 2013 3:18 pm
by anormal
Re-hello.
Now the issue is that when i was on the 16f877a, i was putting the gLCD on the port D and software mode to 1 and it worked...
On the 18f4520 and 4455 it crash when i try to compile with some failures ...
If someone knows how to make it work on another port than the C it could be great. Or if someone has a schema of a multiplexer on proteus it could help.
Thank you.
Re: Issues about the glcd on flowcode.
Posted: Tue May 14, 2013 2:39 pm
by anormal
Hello it's me again.
So my new problem is when I use the touchscreen with the EB076 on the PIC18f4520 the value it give are totally bugged. Like when i touch the top of the screen I have ~0 but when i gradually go to the back they reset at the center of the screen.
On the 16f877A the value are perfect and it all work.
If you could help me again
Thanks
Re: Issues about the glcd on flowcode.
Posted: Tue May 14, 2013 3:50 pm
by Benj
Hello,
Please could you attach your program and use the links in my signature below to sign up for one of the Flowcode topics and I will look into the issue for you.
Re: Issues about the glcd on flowcode.
Posted: Tue May 14, 2013 3:56 pm
by anormal
Here is the test program that we've done.
Note that on the PIC16F877A it work perfectly for us.
I've finished signed up now

Re: Issues about the glcd on flowcode.
Posted: Thu May 16, 2013 10:45 am
by anormal
It would be great if you could help me because we have an exam in 5 weeks on this touchscreen.
Thanks again for the help.
Re: Issues about the glcd on flowcode.
Posted: Thu May 16, 2013 11:19 am
by Benj
Hello,
Is it just the touchscreen your having problems with? Does the display correctly clear and allow you to draw etc using the 18F device?
There is a speed up at the end of the init funtion you could try disabling to see if this is the cause of the problem.
Right click the gLCD on the panel and select custom code.
Select the Init function and click edit.
Find this section of code.
Code: Select all
#if (%a_MX_GLCD_BUSTYPE != 0)
%a_UART_Send(0x51); //Update Baud Command
%a_UART_Send(0x0C); //Update to 57600bps
%a_UART_Receive(255); //Try to collect Ack
%a_UART_Update_Baud(6); //Update UART baud to 57600bps
#endif
And comment out to remove the speed change.
Code: Select all
/*
#if (%a_MX_GLCD_BUSTYPE != 0)
%a_UART_Send(0x51); //Update Baud Command
%a_UART_Send(0x0C); //Update to 57600bps
%a_UART_Receive(255); //Try to collect Ack
%a_UART_Update_Baud(6); //Update UART baud to 57600bps
#endif
*/
Re: Issues about the glcd on flowcode.
Posted: Tue May 21, 2013 11:00 am
by anormal
I'll test it in 1 hour and will tell you if it works.
And yes it clears and allow me to draw on the 18F.
Re: Issues about the glcd on flowcode.
Posted: Tue May 21, 2013 2:21 pm
by anormal
Just tested to disable the speed function and it's even worst.
The value we get aren't reseted they are random.
like on the Y axis we start at ~16 and it go directly at 200 and it go back to ~0 and go to ~350 and finaly end at ~250.
I think it's because of the software mod that the value are bugged.