Society of Robots - Robot Forum

Software => Software => Topic started by: Charizard on November 28, 2009, 12:35:18 AM

Title: my LCD shows only solid block
Post by: Charizard on November 28, 2009, 12:35:18 AM
Hi, I am planning to allow my robot to sense temperature, then at certain temperature, the LED will light, fan work and the LCD display the temperature. I am using PIC16f877a, the pin connection between LCD and PIC looks like this,
LCD =>PIC
DB0~DB7=> RB1~RB7 (portB)
RS =>RD7
E =>RC7
 However, when i try to run it, the LCD just show solid block in the first line. After troubleshoot for quite sometime, i couldn't find the root prob, can anyone help me with this? Here is my code in the attachment. I look at the datasheet, it says that port B has weak pull up, do I need to disable it?

Thanks.

Title: Re: my LCD shows only solid block
Post by: Trumpkin on November 28, 2009, 10:29:37 AM
What LCD are you using? Solid black means the LCD is not initializing properly.
Title: Re: my LCD shows only solid block
Post by: Charizard on November 28, 2009, 02:48:28 PM
It is a 2x16 LED. I tried to modify the code to show the same character for line1 and line2 of the LCD;yet it still only show solid block in first line,and line2 is blank. The LCD not initialized properly means is the pin assignment in the code problem?