Issues about the glcd on flowcode.

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Issues about the glcd on flowcode.

Post 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. :)

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Issues about the glcd on flowcode.

Post 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.

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post by anormal »

I tried on the port C and D, with and without software mode, changing the jumpers, A, B, Patch mode, nothing works :/

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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 :roll:

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times

Re: Issues about the glcd on flowcode.

Post by dazz »

Hi
Can you disable the following in config, watchdog timer and extended cpu enable then try again

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post by anormal »

It seems to work !!!

Thank you, i'll tell you if i have any others problems :D

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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 :twisted:

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

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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. :)

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times

Re: Issues about the glcd on flowcode.

Post by dazz »

Hi

Thanks for letting us know, most times something stops working its in the config somewhere
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Issues about the glcd on flowcode.

Post by DavidA »

Indeed, the test files are designed for one chip only (16F887A in 90% of cases).

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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.

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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

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: Issues about the glcd on flowcode.

Post 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.

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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 :wink:
Attachments
touchscreen test.fcf
(11.5 KiB) Downloaded 212 times

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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.

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: Issues about the glcd on flowcode.

Post 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
	*/

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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.

anormal
Posts: 16
Joined: Thu Mar 21, 2013 9:25 am
Been thanked: 3 times

Re: Issues about the glcd on flowcode.

Post 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.

Post Reply