20x4 LCD shows Black boxes

Status
Not open for further replies.
@jayanth Sorry my pic is not PIC18F65J90 even though the folder is named as that. Its PIC18F45K22. I forgot to rename the folder. But thank you. The problem is not with the code I think. I'm going to add a delay & see as Bigdog mentioned.



@PA3040 how to get the DSN file ?
 
Last edited:

Try this hex. It is compiled for PIC18F45K22. If your LCD pins are different then just change it and recompile it.
 

Attachments

  • LCD PIC18F45K22.rar
    89.7 KB · Views: 65
Reactions: ADGAN

    ADGAN

    Points: 2
    Helpful Answer Positive Rating
I'll have to wait till Monday to test the LCD again. I'll try this code.
 

It didn't work. What should I do now ? Do I have to replace the LCD?
 

What should I do now ? Do I have to replace the LCD?


I seriously doubt the LCD is damage, otherwise you would most likely get no boxes or just plain garbage every time the LCD was powered up.

Have you tried an 8-bit interface using the C18 compiler and XLCD libraries?


BigDog
 

Do not forget to modify the delay routines and generate a 100ms delay to allow the LCD to fully initialize before calling any of the LCD routines.

You also might try slowing down the Fosc to 4MHz, if I remember correctly at that Fosc the XLCD routines may work without modification, although you still need to generate the initial 100ms delay.

Are you still getting solid boxes on the 1st and 3rd rows?


BigDog
 

Can we able to see your hardware and schematic

What are the inability to connect LCD in 8 it mode as Bigdogguru pointed out
 

I tried the 8 bit mode and even gave a 100ms delay. But it didn't work. I don't have the circuit right now. I'll try to post a photo tomorrow.
 

I check all the possible solutions. But nothing worked :sad: So I thought of purchasing a new one. This is the circuit diagram & the real image of the hardware. Sorry I think the image is not much clear.

**broken link removed**

**broken link removed**
 

Grab an ohm meter an try a continuity test between the solder pads on the LCD and the end of the wires... maybe there is a faulty solder connection or break in one of the wires...
 

Apparently there was no connection between the solder pads. But there were two solder pad which I suspected, I think those are internally connected. Apparently those two also didn't seems to be connected.
 

As per your picture I am sure that your LCD is working.

Now you have to rectify the fault step by step

Step1, try to connect LED to MCU
Step2, write the program to blink the LED at visible level

If your program and MCU configuration are correct then the LED should blinks as per your program

Then you can confirm that your program and configuration and Fosc are working

Hoped this will help to for next step
 
Last edited:

You mean the LED is blinking with your breadboard cct not with Proteus
 

Yes I tested it in the breadboard to check whether the PIC is working properly.
 

If you have the project file send me that. I already tried many different examples. Don't know whether it will work. I don't have the hardware right now. I'll have to wait till tomorrow.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…