interafcing GLCD with PIC18F4550

General discussion on Visual GLCD Software.
Post Reply
Author
Message
shaha2015
Posts: 5
Joined: 26 Mar 2015 19:57

interafcing GLCD with PIC18F4550

#1 Post by shaha2015 » 26 Mar 2015 21:00

hello friends i am trying to interface GLCD to PIC18F4550, i am using built in libraries of mikroc... my GLCD is working fine for less code, but when i call different functions then it is not displaying anything... can any1 solve this problem.

Here i am attaching my c file and proteus model file. i am using mikcroC 6.0.0 licensed.

my problem in detail: in the C file when i comment the lines from N0.384 to line No.394 ten my GLCD is showng water level (ie tank image).
But when i delete the comment from line 384 to 394 then nothing is working. please can any1 solve this.

NOTE THAT : i am using RAM 13% and ROM 20% when all functions are called.
and RAM 6% and ROM 14% used when the functions from line 384 t 394 are commented.
Attachments
PROTEUS MODEL AND C FILE.rar
(32.92 KiB) Downloaded 220 times

User avatar
darko.minic
Posts: 747
Joined: 01 Dec 2014 11:10

Re: interafcing GLCD with PIC18F4550

#2 Post by darko.minic » 27 Mar 2015 11:10

Hi,

Pay attention that Proteus isn't certified environment for testing projects written in our compiler.
We usually recommend our users to test their projects on real hardware.

I can recommend you to go through debug with real hardware and examine functions which you use in while loop,
so you can see where problem occurs.

Regards,
Darko

shaha2015
Posts: 5
Joined: 26 Mar 2015 19:57

Re: interafcing GLCD with PIC18F4550

#3 Post by shaha2015 » 30 Mar 2015 08:25

sir i tested the same code on real hardware... same problem is comming..

i have noticed one thing that when my ROM size goes above 14% then its not working, and below 14% its working... why so?

thanks for the reply.

waiting for your help.

User avatar
darko.minic
Posts: 747
Joined: 01 Dec 2014 11:10

Re: interafcing GLCD with PIC18F4550

#4 Post by darko.minic » 30 Mar 2015 16:47

Hi,

Unfortunately I don't have same condition to test your code.
As I can see from your code it seems that program stuck inside collect_data(); function.
Stuck is probably related with UART.

I can recommend you to try to initialize UART with our library, and see if problem remains the same.
Also I can recommend you to go through hardware debug and see where stuck occurs.

Regards,
Darko

User avatar
darko.minic
Posts: 747
Joined: 01 Dec 2014 11:10

Re: interafcing GLCD with PIC18F4550

#5 Post by darko.minic » 31 Mar 2015 08:44

Hi,

Also can you please send me your whole zipped project from compiler?

Regards,
Darko

shaha2015
Posts: 5
Joined: 26 Mar 2015 19:57

Re: interafcing GLCD with PIC18F4550

#6 Post by shaha2015 » 01 Apr 2015 05:01

sir thanks for giving me your valuable time .actually collect_data() function is written after water_level() function. so if it is stucking in collect_data() then at least it has to show water level on GLCD. but its not working. i tried by writing while(1); after water_level so that program should not go down, but still same problem. i am attaching my project zip file. thank you sir.

please refer "dp.mcppi" project in the zip file.
Attachments
CODE.rar
(192.23 KiB) Downloaded 210 times

User avatar
darko.minic
Posts: 747
Joined: 01 Dec 2014 11:10

Re: interafcing GLCD with PIC18F4550

#7 Post by darko.minic » 01 Apr 2015 10:09

Hi,

I have tried your code, there was some little adjustment so I can run GLCD on my EasyPIC v7.
Unfortunately I was unable to reproduce the problem, I was able to get water level drawing on GLCD either
with and without commenting mentioned part of code.

Please try to connect GLCD as is on EasyPIC v7, and use this lines of code for GLCD bits declarations:

Code: Select all

sbit GLCD_DataPort at PORTD;

sbit GLCD_CS1 at LATB0_bit;
sbit GLCD_CS2 at LATB1_bit;
sbit GLCD_RS  at LATB2_bit;
sbit GLCD_RW  at LATB3_bit;
sbit GLCD_EN  at LATB4_bit;
sbit GLCD_RST at LATB5_bit;

sbit GLCD_CS1_Direction at TRISB0_bit;
sbit GLCD_CS2_Direction at TRISB1_bit;
sbit GLCD_RS_Direction  at TRISB2_bit;
sbit GLCD_RW_Direction  at TRISB3_bit;
sbit GLCD_EN_Direction  at TRISB4_bit;
sbit GLCD_RST_Direction at TRISB5_bit;
Regards,
Darko

shaha2015
Posts: 5
Joined: 26 Mar 2015 19:57

Re: interafcing GLCD with PIC18F4550

#8 Post by shaha2015 » 01 Apr 2015 12:28

sir thanks for your reply. actually i am not using easy pic v7 . but i have connected the the circuit using another development board. but same problem is coming. may be i m doing any mistake in configuration settings. can u tell me the setting which u have used.
thank you.

User avatar
darko.minic
Posts: 747
Joined: 01 Dec 2014 11:10

Re: interafcing GLCD with PIC18F4550

#9 Post by darko.minic » 02 Apr 2015 08:04

Hi,

The only difference is that I used 8MHz external oscillator instead of 12MHz which is defined in your project settings.
Also I changed GLCD bits declaration as I mentioned in post before.

If you still have problem I will send you my zipped project which I have tried.

Regards,
Darko

qweiczz
Posts: 8
Joined: 04 Dec 2018 07:13

Re: interafcing GLCD with PIC18F4550

#10 Post by qweiczz » 19 Dec 2018 10:07

sir i tested the same code on real hardware... same problem is comming..

i have noticed one thing that when my ROM size goes above 14% then its not working, and below 14% its working... why so?

thanks for the reply.

waiting for your help.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: interafcing GLCD with PIC18F4550

#11 Post by filip » 20 Dec 2018 14:37

Hi,

Can you please attach the minimal project that represents this issue ?

Regards,
Filip.

Post Reply

Return to “Visual GLCD General”