Hi.
my program function well in ISIS proteus but in the real life it dosen't, the problem thats a have in the first line many black square.
i use a 4 bits configuration and 18f4550 pic.
thats my program please help me.
sorry for my bad level of english thats my first time in this forum.
i put the third pin (3) of the LCD in the GND i didn't use a pot and (do you think thats not wrong ??)
also i I connected RW pin to Ground because i use the lcd only to write things and i see in others forum that it is wrong and i must connect R/W to a pin of the pic. thats true ????
and if i must do it what i must change in my program
I use MIKROC pro for pic
Thx
my program function well in ISIS proteus but in the real life it dosen't, the problem thats a have in the first line many black square.
i use a 4 bits configuration and 18f4550 pic.
thats my program please help me.
sorry for my bad level of english thats my first time in this forum.
Rich (BB code):
sbit LCD_RS at LATB0_bit;
sbit LCD_EN at LATB1_bit;
sbit LCD_D4 at LATB2_bit;
sbit LCD_D5 at LATB3_bit;
sbit LCD_D6 at LATB4_bit;
sbit LCD_D7 at LATB5_bit;
// Pin direction
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
/****************************Programme Principal*********************/
void main()
{
TRISA=0x00;
TRISB=0x00;
PORTB.f0=0;
PORTA=0xFF;
delay_ms(1000);
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
delay_ms(500);
Lcd_Out(1,1,"bonjour");
delay_ms(500);
LCD_out(2,2,"Salut");
delay_ms(500);
}
also i I connected RW pin to Ground because i use the lcd only to write things and i see in others forum that it is wrong and i must connect R/W to a pin of the pic. thats true ????
and if i must do it what i must change in my program
I use MIKROC pro for pic
Thx