Electronics4you
Member
LCD configuration
Hi there,
I'm building a 20x4 LCD controller with a PIC16F877A and tested it with the following sample code from the CD to my EasyPIC3 dev. board written in mikroC. I connect the wires like on the EasyPIC3 dev. board (D7-D4 to RB7-RB4, E to RB3, RS to RB2 and all others to GND), but the only thing I get is some blocks on line 2 and 4. Any ideas...? I have tried to search for any "missing link" but all is clear.
Hi there,
I'm building a 20x4 LCD controller with a PIC16F877A and tested it with the following sample code from the CD to my EasyPIC3 dev. board written in mikroC. I connect the wires like on the EasyPIC3 dev. board (D7-D4 to RB7-RB4, E to RB3, RS to RB2 and all others to GND), but the only thing I get is some blocks on line 2 and 4. Any ideas...? I have tried to search for any "missing link" but all is clear.
Code:
char *text = "mikroElektronika";
void main() {
LCD_Init(&PORTB); // Initialize LCD connected to PORTB
LCD_Cmd(LCD_CLEAR); // Clear display
LCD_Cmd(LCD_CURSOR_OFF); // Turn cursor off
LCD_Out(1,1, text); // Print text to LCD, 2nd row, 1st column
Delay_ms(1000);
LCD_Out(2,6,"mikroE");
}//~!
Last edited: