I have a little problem I don t understand. I have a very simple program to use my LCD on my development board I have just bought.
I just want to see my sentence every seconds on my screen using a PIC16f877a.
Here my code:
Code: Select all
sbit LCD_RS at RA1_bit;
sbit LCD_EN at RA3_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_RS_Direction at TRISA1_bit;
sbit LCD_EN_Direction at TRISA3_bit;
sbit LCD_D7_Direction at TRISD7_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D4_Direction at TRISD4_bit;
void main(){
CMCON=0x07;
ADCON1=0X07; //a port as ordinary i/o.
TRISA=0X00; //a port as output.
TRISD=0X00; //d port as output.
Lcd_Init();
do{
Lcd_Out(1,2,"First project");
Lcd_Out(2,2,"with lcd screen");
delay_ms(1000);
Lcd_cmd(_LCD_CLEAR);
Delay_ms(1000);
}while(1);
}
Unfortunately, nothing.... My screen is just yellow.
I checked the PIN assignments, and they are correct.
Here the assignment (see p22) : http://www.pic16.com/soft/QL200_user_a4_en.pdf
Could you give me an idea or a solution?
Thank you.