LCD Unable to display with SK40C

Programmer, In-Circuit Debugger, PIC Start-Up Kit, Memory Interface...

Re: LCD Unable to display with SK40C

Postby aru » Thu Jan 18, 2018 10:39 am

Hi bengchet, Ober, Idris

Tested exactly the same code, library settings as forwarded to you.
But this time, I connected the LCD, and trimpot off board. Not using SK40C LCD port.
It works perfectly ok.
So, I do not see any problems with the code and library settings.
What is puzzling to me is why it does not work when connected to SK40C LCD port.
There is no shorting between header pins, continuity check between SK40C LCD port header pins to respective 18F4550 pins shows nothing open.

The only difference I see is that you have hard ground for PIN5 of the SK40C LCD port.
But when I use off board, I do not short pin5 to ground but let the library assert the pin5 logic to 0.

Please help advice. I am having a number of students using the SK40C and would appreciate a fix for this.
aru
Newbie
 
Posts: 9
Joined: Fri Jan 05, 2018 2:53 pm

Re: LCD Unable to display with SK40C

Postby bengchet » Thu Jan 18, 2018 4:02 pm

Hi,

Ok, let's send us whole library and coding. We try to see if we can reproduce the problem and get back to you. We don't have your library and coding, so please attach here as zip files.

Thanks.
bengchet
Moderator
 
Posts: 198
Joined: Tue Aug 25, 2015 8:29 am

Re: LCD Unable to display with SK40C

Postby aru » Thu Jan 18, 2018 5:02 pm

Program 9.1.rar
(634 Bytes) Downloaded 3 times


Hi bengchet,

I am using MPLAB V8.92 and MPLABC18 V3.47.
Program code is attached herewith.
All the libraries used are part of MPLABC18, built-in libraries. These can be added to the project.
I made changes to xlcd.h library file to use the ports according to SK40C lcd port requirements.
I have already given you details of the changes made.

Thanks
aru
Newbie
 
Posts: 9
Joined: Fri Jan 05, 2018 2:53 pm

Re: LCD Unable to display with SK40C

Postby bengchet » Thu Jan 18, 2018 5:52 pm

Hi,

In the meanwhile, also check the connection between LCD pads and PIC port pins (pins on IC, not on SK40C board) using multimeter. Sometimes this kind of issue comes from connection. You can check soldering as well as suggested by Idris.
bengchet
Moderator
 
Posts: 198
Joined: Tue Aug 25, 2015 8:29 am

Re: LCD Unable to display with SK40C

Postby aru » Thu Jan 18, 2018 9:43 pm

Hi bengchet,

I have checked all the SK40C lcd port header pins for short and continuity all the way to the respective microcontroller pins. Could not find any problems.

My code uses busy flag method to send data. For this, it uses the library function while(BusyXLCD( ));.
For this function to work, R/W pin of the LCD should not be permanently connected to ground since the function will attempt reading. Since SK40C has the R/W pin permanently connected to ground, the reading is disabled permanently.
I believe this the reason for SK40C lcd port not working when using MPLABC18 built in library.
I will check this again and confirm in the hardware.

Thanks
aru
Newbie
 
Posts: 9
Joined: Fri Jan 05, 2018 2:53 pm

Re: LCD Unable to display with SK40C

Postby bengchet » Fri Jan 19, 2018 10:53 am

Hi,

For this case, you might need to disable reading in the library. By the way, RW pin is not necessary to display characters in LCD in my opinion. That pin is seldom used.
bengchet
Moderator
 
Posts: 198
Joined: Tue Aug 25, 2015 8:29 am

Re: LCD Unable to display with SK40C

Postby ober » Sat Jan 20, 2018 9:14 am

RW is Read or Write pin. Since LCD is to display character from controller, is an output so we seldom read it, that is the reason why on SK40C that pin is GND to indicator we are writing to it.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1334
Joined: Wed Apr 15, 2009 1:03 pm

Re: LCD Unable to display with SK40C

Postby aru » Mon Jan 22, 2018 9:22 am

Hi,

bengchet and ober,

I have already verified in the hardware. This problem can be considered resolved. Thanks for your help.

Sending command and data to LCD can be done in two ways;
1.Time Delay Method.
2. Busy Flag Method.
I am using Busy Flag Method that is used by the MPLABC18 built-in library. To use this library, we must not have Pin5 of LCD permanently connected to ground since the library will read the flag which will indicate if a command or a data has been sent successfully. Hence we need to have Pin5 to be asserted by the program.
SK40C is good for Time Delay Method, not for Busy Flag Method.

We can consider this closed.
Thanks.
aru
Newbie
 
Posts: 9
Joined: Fri Jan 05, 2018 2:53 pm

Re: LCD Unable to display with SK40C

Postby ober » Thu Jan 25, 2018 8:55 am

Good to hear that!
Do share with us your project, some pictures and short description will be good.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1334
Joined: Wed Apr 15, 2009 1:03 pm

Previous

Return to PIC Development Tool

Who is online

Users browsing this forum: No registered users and 1 guest