AlesK
Newbie level 5
- Joined
- Jul 17, 2014
- Messages
- 8
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 71
I have LCD qc1602a v2. I am using library for communication with Lcds (with HD44780 compliant controllers) through the 4-bit interface. I can not write in second line. I tried to move cursor in second row but useless. I have tried to wire a LCD to PIC B ports but i get the same error. I am using a example. I am stuck.
MY CODE:
MY CODE:
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 // LCD module connections sbit LCD_RS at RC4_bit; sbit LCD_EN at RC5_bit; sbit LCD_D4 at RC0_bit; sbit LCD_D5 at RC1_bit; sbit LCD_D6 at RC2_bit; sbit LCD_D7 at RC3_bit; sbit LCD_RS_Direction at TRISC4_bit; sbit LCD_EN_Direction at TRISC5_bit; sbit LCD_D4_Direction at TRISC0_bit; sbit LCD_D5_Direction at TRISC1_bit; sbit LCD_D6_Direction at TRISC2_bit; sbit LCD_D7_Direction at TRISC3_bit; // End LCD module connections void main(){ ANSELC = 0; // Configure AN pins as digital I/O C1ON_bit = 0; // Disable comparators C2ON_bit = 0; delay_ms(500); Lcd_Init(); // Initialize LCD Lcd_Cmd(_LCD_CLEAR); // Clear display Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off Lcd_Out(1,1,"First row"); // Write text in first row Delay_ms(2000); Lcd_Out(2,1,"Second row"); // Write text in second row Delay_ms(2000); while(1) { } }
Last edited by a moderator: