syeda amna
Full Member level 4
- Joined
- Jun 1, 2010
- Messages
- 222
- Helped
- 24
- Reputation
- 48
- Reaction score
- 22
- Trophy points
- 1,308
- Location
- Pakistan
- Activity points
- 2,551
I want to interface 16x2 LCD with PIC 18F452. I am using CCS compiler and Proteus 7.8. What is wrong?
My C code is here
My C code is here
Code:
#include <18F452.h>
#use delay (clock=4000000)
#define LCD_ENABLE_PIN PIN_E0
#define LCD_RS_PIN PIN_E1
#define LCD_RW_PIN PIN_E2
#define LCD_DATA4 PIN_D4
#define LCD_DATA5 PIN_D5
#define LCD_DATA6 PIN_D6
#define LCD_DATA7 PIN_D7
#include <lcd.c>
#fuses HS,NOWDT,NOPROTECT,NOLVP
void main()
{
set_tris_d(0x00);
set_tris_e(0x00);
lcd_gotoxy(1,1);
lcd_init();
Delay_ms(1000);
printf(lcd_putc,"Hello");
}