ferkar
Joined: 14 Jul 2007 Posts: 38
|
lcd does not show the first char of the converted string |
Posted: Sun Jan 03, 2010 10:13 am |
|
|
Here is my codes. I get the string from serial channel and show it on 1st line of the LCD. It is ok. But when I try to convert it by using atol() then the first char is not shown. Could you help me?
Code: |
char gv[10]="";
char gv2[10]="";
#int_RDA
RDA_isr()
{
disable_interrupts(int_rda);
gets(gv);
z=atol(gv);
lcd_gotoxy(1,2);
printf(lcd_putc,"gveri:%s",gv);
lcd_gotoxy(1,1);
printf(lcd_putc,"%lu",z);
}
|
//////////////the summary is below
023
gveri:123
any comment? |
|