Praveen Kumar P S
Member level 4
- Joined
- Aug 21, 2014
- Messages
- 79
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 8
- Location
- India
- Activity points
- 627
Hello Guys.....
I was trying to interface a 16x2 lcd with a pic18f4550. There is no problem with my lcd connection...
Here my code...
It compile without error..but when run on a real hardware the lcd displays everything in a improper way with unreadable characters..
It shows something like "SWEHI **8*??/HESW***" ( *----->Characters not in my keyboard )
I think This is due to the clock delay i m using( also my board consist of a inbuilt 16Mhz Crystal)
i m using a flex_lcd driver .....
ACTUALLY I dont know how to set the clock correctly....Plz help me guys....
Thank YOU.............
I was trying to interface a 16x2 lcd with a pic18f4550. There is no problem with my lcd connection...
Here my code...
Code:
#include <18F4550.h>
#fuses XT, NOWDT, PUT, BROWNOUT, CPUDIV1
#use delay(clock=48000000)
#include<flex_lcd216.c>
void main()
{
delay_ms(500);
lcd_init();
delay_ms(500);
for(;;)
{
lcd_gotoxy(1,1);
delay_ms(100);
lcd_putc("HI SWEETY ");
delay_ms(1000);
lcd_gotoxy(2,2);
delay_ms(100);
printf(lcd_putc,"HELLO SWEETY");
delay_ms(1000);
output_high(PIN_B0);
delay_ms(100);
output_low(PIN_B0);
delay_ms(100);
}
}
It compile without error..but when run on a real hardware the lcd displays everything in a improper way with unreadable characters..
It shows something like "SWEHI **8*??/HESW***" ( *----->Characters not in my keyboard )
I think This is due to the clock delay i m using( also my board consist of a inbuilt 16Mhz Crystal)
i m using a flex_lcd driver .....
ACTUALLY I dont know how to set the clock correctly....Plz help me guys....
Thank YOU.............