Page 2 of 2

Re: LCD Unable to display with SK40C

PostPosted: Thu Jan 18, 2018 10:39 am
by aru
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.

Re: LCD Unable to display with SK40C

PostPosted: Thu Jan 18, 2018 4:02 pm
by bengchet
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.

Re: LCD Unable to display with SK40C

PostPosted: Thu Jan 18, 2018 5:02 pm
by aru
Program 9.1.rar
(634 Bytes) Downloaded 436 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

Re: LCD Unable to display with SK40C

PostPosted: Thu Jan 18, 2018 5:52 pm
by bengchet
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.

Re: LCD Unable to display with SK40C

PostPosted: Thu Jan 18, 2018 9:43 pm
by aru
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

Re: LCD Unable to display with SK40C

PostPosted: Fri Jan 19, 2018 10:53 am
by bengchet
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.

Re: LCD Unable to display with SK40C

PostPosted: Sat Jan 20, 2018 9:14 am
by ober
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.

Re: LCD Unable to display with SK40C

PostPosted: Mon Jan 22, 2018 9:22 am
by aru
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.

Re: LCD Unable to display with SK40C

PostPosted: Thu Jan 25, 2018 8:55 am
by ober
Good to hear that!
Do share with us your project, some pictures and short description will be good.