ITP
Advanced Member level 4
Hi All,
Two of my function definitions in CCS C Compiler are as follows.
void lcd_print(unsigned char *string)
{
while (*string)
lcd_data_out (*string++);
}
void lcd_data_out(unsigned char c) // Writes the data in A to LCD
{
lcd_rs = 1;
send_char(c);
}
When I use the function "lcd_print("Hello");" it is not working but when I
use "lcd_data_out("Hello");" is working fine. In fact 'lcd_data_out' function is
a sub-function of 'lcd_print' and supposed to print single character. Can you please
tell me that I am doing any mistake.Is there any alternative way to do this.
Thanks and regards
Itp
Two of my function definitions in CCS C Compiler are as follows.
void lcd_print(unsigned char *string)
{
while (*string)
lcd_data_out (*string++);
}
void lcd_data_out(unsigned char c) // Writes the data in A to LCD
{
lcd_rs = 1;
send_char(c);
}
When I use the function "lcd_print("Hello");" it is not working but when I
use "lcd_data_out("Hello");" is working fine. In fact 'lcd_data_out' function is
a sub-function of 'lcd_print' and supposed to print single character. Can you please
tell me that I am doing any mistake.Is there any alternative way to do this.
Thanks and regards
Itp