hi,
>>I've tested the LCD today. As your suggestion, I've connected a 0.1uF capacitor accross pins 1&2 of the LCD. The circuit have some improvement that the partial dark rectangles appear longer time than before. Erm...I'm not sure that I've use 2 capacitors to accross pins 1&2, which one capacitor connect to pin1 to ground, and another capacitor connect to pin2 to Vcc. Am I correct to connect by this way?
Beside, you had mentioned that the LCD will show all dark rectangles if the voltage is more than 0.8 to 1.4V. But my LCD is just turn on the dark rectangles partially, and appear a few second. What does it mean for my circuit? Is the programme problem or the hardware not stable?
If you are trying to run the program I posted 'lcd2line1', that works OK in the PIC.
Its most likely you have a problem in your hardware.
I have found that different LCD's do have a different pixel block contrast level.
As I suggested, write a simple LED ON/OFF program and prove the hardware for the remainder of the project.. once you are sure the project works without the alpha-numeric LCD, then you can get an idea if the LCD is faulty or not.