i have a problem with this code:
Code: Select all
void main()
{
unsigned short *out[10];
char *out_lcd[10];
int i;
LCD_Init(&PORTB);
Usart_Init(4800);
LCD_Cmd(LCD_CURSOR_OFF);
delay_ms(1000);
do
{
if(usart_data_ready())
{
for(i = 0; i <= 0; i++)
{
out[i] = usart_read();
}
for(i = 0; i <= 0; i++)
{
usart_write(out[i]);
delay_ms(500);
}
for(i = 0; i <= 0; i++)
{
ShortToStr(out[i], out_lcd[i]);
}
lcd_cmd(lcd_clear);
for(i = 0; i <= 0; i++)
{
lcd_out(1,1,out_lcd[i]); //this is where im stuck !!!
}
}
}while(1);
}
the problem is that the USART output is limited to 3 characters and the LCD displays just ascii instead of characters..
any suggestions??
thanks,
Madhu.