hemnath
Advanced Member level 3
- Joined
- Jun 24, 2012
- Messages
- 702
- Helped
- 61
- Reputation
- 120
- Reaction score
- 57
- Trophy points
- 1,308
- Location
- Chennai
- Activity points
- 6,589
Hi, trying to display a string on LCD using PIC18F2520. But nothing is displayed on the LCD. Please help. Im using MikroC
HTML:
sbit LCD_RS at RA2_bit;
sbit LCD_EN at RA1_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_RS_Direction at TRISA2_bit;
sbit LCD_EN_Direction at TRISA1_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;
char message1[] = "Electronics";
void main()
{
TRISA = 0x00;
TRISB = 0x00;
PORTA = 0x00;
PORTB = 0x00;
lcd_init();
while(1)
{
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
Lcd_Out(1,1,message1);
delay_ms(1000);
lcd_cmd(_lcd_clear);
delay_ms(1000);
}
}