Not able to interface 16x2 LCD with PIC16F887

Bubble's picture
Offline
Joined: May 05, 2017
Not able to interface 16x2 LCD with PIC16F887
May 5, 2017 - 4:24pm

Hi!,

I'm facinng prblm with interfacing of 16x2 LCD with PIC 16f887.

I used code, given by circuit digest. Builld & burn are fine but not getting anything on LCD (Only upper line is with black blocks) using potentiometer I had also changed its contrast. As I'm using PIC16F887 so i configured accordingly & also interchanged RS & EN with RC0 & RC2 as this is used in my circuitry. Now please guide where is mistake? Crystal freq. in my case is 8MHz.

Regards,

Bubble

B.Aswinth Raj's picture
Offline
Joined: Aug 16, 2016
Try this solution!!
May 6, 2017 - 12:20pm

Hi bubble,

If you are able to see those black boxes in the first line, it means that you have set the contrast properly so you do not have to worry about it. 

Make sure your RW pin is tied to ground. If that is also done, and you still face the same problem then the culprit will be the RS and EN pin.

Since you say that you have altered the program based on your circuitry make sure you have declared RC0 and RC2 as output pins.

 

Also I would need the following information to help you much better

1. The PIC IC which you are using, is it PIC16F877A or PIC16F877?

2. Have you tried to simulate your output after changing the program and wiring. If yes what was the result? 

 

Bubble's picture
Offline
Joined: May 05, 2017
Thankyou very much sir!
May 7, 2017 - 9:49pm

Thankyou very much sir!

Exactly the same mistake I was doing that RC0 & RC2 were not declared as output.

Now LCD is responding but not accurate..... but first I will try & if problem remain exist, I will ask for help.

Again thanks for the fast & accurate response/solution.

Regards,

Bubble

B.Aswinth Raj's picture
Offline
Joined: Aug 16, 2016
Glad it worked for you!!
May 10, 2017 - 11:28pm

Thanks!!