khaled01819
Newbie level 6
- Joined
- May 27, 2010
- Messages
- 11
- Helped
- 2
- Reputation
- 4
- Reaction score
- 1
- Trophy points
- 1,283
- Location
- bangladesh
- Activity points
- 1,370
Hi! I m very new here. i m trying to connect 1602 alphanumeric lcd with pic 16f676 for display message. but it is not responding. I have write following example c-code bellow.
// LCD module connections
sbit LCD_RS at RC0_bit;
sbit LCD_EN at RC1_bit;
sbit LCD_D4 at RC2_bit;
sbit LCD_D5 at RC3_bit;
sbit LCD_D6 at RC4_bit;
sbit LCD_D7 at RC5_bit;
sbit LCD_RS_Direction at TRISC0_bit;
sbit LCD_EN_Direction at TRISC1_bit;
sbit LCD_D4_Direction at TRISC2_bit;
sbit LCD_D5_Direction at TRISC3_bit;
sbit LCD_D6_Direction at TRISC4_bit;
sbit LCD_D7_Direction at TRISC5_bit;
// End LCD module connections
char Message1[]="THIS IS AN";
char Message2[]="Alphanumaric";
char Message3[]="LCD";
char Message4[]="Test Project";
void main() {
ADCON = 0x00;
CMCON = 0x00;
TRISC = 0xFF;
TRISA = 0xFF;
do {
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_Lcd_Cursor_off);
Lcd_Out(1,1,Message1);
Lcd_Out(2,1,Message2);
delay_ms(5000);
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_Lcd_Cursor_off);
Lcd_Out(1,1,Message3);
Lcd_Out(2,1,Message4);
delay_ms(5000);
} while(1);
} // End main()
what is the change need for solution
plz anybody help me..........
// LCD module connections
sbit LCD_RS at RC0_bit;
sbit LCD_EN at RC1_bit;
sbit LCD_D4 at RC2_bit;
sbit LCD_D5 at RC3_bit;
sbit LCD_D6 at RC4_bit;
sbit LCD_D7 at RC5_bit;
sbit LCD_RS_Direction at TRISC0_bit;
sbit LCD_EN_Direction at TRISC1_bit;
sbit LCD_D4_Direction at TRISC2_bit;
sbit LCD_D5_Direction at TRISC3_bit;
sbit LCD_D6_Direction at TRISC4_bit;
sbit LCD_D7_Direction at TRISC5_bit;
// End LCD module connections
char Message1[]="THIS IS AN";
char Message2[]="Alphanumaric";
char Message3[]="LCD";
char Message4[]="Test Project";
void main() {
ADCON = 0x00;
CMCON = 0x00;
TRISC = 0xFF;
TRISA = 0xFF;
do {
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_Lcd_Cursor_off);
Lcd_Out(1,1,Message1);
Lcd_Out(2,1,Message2);
delay_ms(5000);
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_Lcd_Cursor_off);
Lcd_Out(1,1,Message3);
Lcd_Out(2,1,Message4);
delay_ms(5000);
} while(1);
} // End main()
what is the change need for solution
plz anybody help me..........