V4.5 Graphical LCD module no longer works

Moderator: Benj

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

V4.5 Graphical LCD module no longer works

Post by Zane »

Hi,

I have a project that i have nearly completed and it has a graphical LCD module attached to it. Under the old version of flowcode everything worked fine. Two days ago i downloaded the latest version of flowcode V4.5, made small changes to my code and comipled it to the chip. After this it no longer works. Even when you make a simple program, just drawing a box it will not display the box and any text it will position it on the y axis but the x axis co orindates are non functional. This problem is also present when you test the program in the simulator on your PC. Any help would be most appreciated, a patch for this even more appreciated.

Thanks for your help.

Regards

Zane

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by medelec35 »

Hi Zane,
have you read this:
http://www.matrixmultimedia.com/mmforum ... =25#p26260

Martin
Martin

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi

To anyone who has been watching this post, i have mistakenly managed to post a reply in another post. There is a link there below for this post.

http://www.matrixmultimedia.com/mmforum ... f=2&t=7724

Here is a link for another post that has a patch for the issues with incorrect glcd co-ordinates and another for the eeprom module.

http://www.matrixmultimedia.com/mmforum ... =29&t=8700

Thanks

Zane

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi,

I have downloaded the patch and the simulation works fine in flowcode now. I still have a problem in hardware though. Initially with the old version of flowcode the display worked fine. With the upgrade the display initialised but the co ordinates were all out as in the simulation. I downloaded the patch and now the display will not initialise. If it is any help i am using a Nokia display. In the initialisation code in the custom code the display is listed as a "type 0" EB43.Any help with this would be most appreciated.

Regards

Zane

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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hi Zane,

Can you select the component, right click and check the connections as as shown below and that the port matches the port you have connected the display to.
EB043.JPG
EB043.JPG (25.32 KiB) Viewed 20636 times
You should also check that the jumper on the board is set to low to match these connections.

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben,

My apologies, i have just checked the connections and instead of how they usually default to porta in the configuration shown, they were different. I have changed them and now the screen will initialise.
I still have an issue though. When you draw a box and make it a solid object there is the outline of the box and then a smaller solid box inside of it offset to the lower right of the outer box, hence having a line of the background colour going up the left hand side and over the top of the box.
Thanks for your help. I'm very impressed with the support from this site.

Regards

Zane

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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hello Zane,

Ok please can you right click on the gLCD on the panel, then select custom code and then select the Plot function and click edit.

At the top of the function code add the following lines.

Code: Select all

#if MX_GFXLCD_TYPE == 0
  X1 = X1 + 1;
  Y1 = Y1 + 1;
#endif
This should then fix the problem.

Alternatively you could open up the component C file from the Flowcode v4/components directory and then edit the function there to allow the changes to always be present in the component.

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben,

Thanks for your efforts. I will try this out.

Cheers

Zane

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben,

I have finally tried this and it works fine. I have now tried adding some text and this will not display correctly. It just displays random characters or a whole lot of "0's".
Another question i have is the C file for the glcd, will the old C file from the previous version of flowcode work with V4.5. If it does are you able to post a copy of this as i have a project i am trying to finish. Thanks for your help.

Regards

Zane

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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hello Zane,

Yes here is the older component C file. It should work fine with v4.5 but I would make a backup of the original first incase you ever need it. Simply pop it into your "Flowcode v4/Components" directory before starting Flowcode. I will also look into why you are getting the garbled text on your EB043 display with the newer c file.
Attachments
PIC_gLCD.c
(32.44 KiB) Downloaded 452 times

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben,

Thanks for your efforts

Cheers

Zane

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben,

I have tried using the older version of flowcodes C file for the glcd in V4.5 with no luck either.

Regards

Zane

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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hello Zane,

Are you still getting garbled output text or is it not working at all for you now?

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben,

Thanks for your reply. With both versions i get garbled ouput text. Under 4.5 i placed "hello" on the screen in the mid poition of the screen and random characters appeared from the start point and worked across the screen, wrapped around and came back again from the left margin. On resetting the chip the characters generated are different each time. Under the previous versions glcd c file i only tried once and got the garbled text. I removed the c file and put the v4.5 c file back.
I Hope this is ofsome help

Thanks

Zane

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: V4.5 Graphical LCD module no longer works

Post by Benj »

I'm looking into this for you Zane and will let you know when I have made some progress.

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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hello Zane,

Ok using the v4.5 gLCD component C file I have tested the EB043-00-1 board and the text is printing out correctly.

Please can you check your component connections for the gLCD and ensure they are as numbered here if using the Low jumper setting.
Attachments
EB043.JPG
EB043.JPG (25.36 KiB) Viewed 20510 times

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben,

Heres some extra info. I have verified all connections via a multimeter from the pic to the buffer and from there through to the lcd, everything goes to where it should. The external connections in flowcode for the module are setup as listed above and are connected accordly in hardware. The display i am using is a nokia 6100 knockoff and the pcb boards i have made myself. Earlier on in the forum i mentioned that i have a chip that had been programmed with the older version of flowcode and everything has worked fine with the lcd and the card containing the pic. The moment i programmed the chip with version 4.5 it has not worked properly since.
With the connections from the pic to the lcd, i gather they must be correct (apart frm the checks with the multimeter) as the display will initialise, i can change the contrast, the back ground and fore ground colours in flowcode, reprogram the chip and these changes take effect. However when i try the text it is garbled.
I have tried using another chip also and the results are the same.
One other thing i could try is uninstalling version 4.5 and reinstalling the previous version and see if that works. Would there be any issues with license for software so the older version would work? If you think this maybe of some help are you able to post the previous version for me to try.
Thanks for your help

Regards

Zane

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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hi Zane,

That's really odd, I can't understand why you are getting the garbled text.

If you output a line to the display does this print correctly?

Have you loaded the updated component C file from here?
http://www.matrixmultimedia.com/mmforum ... =29&t=8700

As I say its working fine for me here so hopefully we can get it working ok for you too in v4.5.

I remember previously making a special version of the component C file with inversion code for someone with a nokia display this wasn't you was it?

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Steve »

Please post your FCF file and the C code file that is generated and we'll be able to check for any problems within your Flowcode program.

Thanks,
Steve.

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben and Steve,

I have down loaded the patch listed and this fixed earlier problems with the co ordinates but not the text issue. I will attach a copy of the files requested for you to look at.

Thanks for your help with this.

Regards

Zane
Attachments
Flowcode1.c
(55.72 KiB) Downloaded 330 times
Flowcode1.fcf
(20.08 KiB) Downloaded 340 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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hi Zane,

Thanks for that. I have now managed to replicate your problem on a 18F4523 device (didn't have the 4525 available). The same code running on a 16F877A is working well so there must be a small problem either with the chip family or the pins that are being used to control the LCD. You say that this display was working well in v4.3 so I will do some more testing and let you know what I find out.

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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hello,

The problem is your configuration settings. Turn off the extended CPU enable setting and the code runs as expected :D

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben and Steve,

A big thanks guys, I tried it this afternoon with the enhanced CPU setting disabled and all is working ok.
As I understand it allows another 7 or 8 instructions that deal with an additional file select register allowing the code to be more compact and is designed to be used more in conjunction with a high level language such as C. Just for my own curiosity what is the reason why it will not work with the enhanced CPU setting enabled?
Sorry for any bothers I have caused you and thanks for the great support you offer for your product.

Regards

Zane

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: V4.5 Graphical LCD module no longer works

Post by Benj »

Hello Zane,

I think to allow the extended / enhanced CPU to work correctly you need to tell the compiler specifically or it gets things like arrays muddled up. I also think that the BoostC compiler does not support this mode of operation at all though I could be wrong.

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: V4.5 Graphical LCD module no longer works

Post by Zane »

Hi Ben,

Thanks for the info and once again for your help.

Regards

Zane

Post Reply