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.
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;
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);
}
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.
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;
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);
}