superbrew
Member
Hi, I am trying to understand how to assign strings in C18. I have built a three wire LCD interface and would like to write some messages on it. I can get the ADC results on the screen if I use the itoa function like this:
However, I can not assign a literal value to the string like:
I have the output assigned as a character array. Why can't I just assign the string like above? What does "const rom char*" mean? I tried looking inot the user's guide, but it does not explain it well enough for me to understand. Thanks.
Code:
itoa(result,output);//Convert ADC result to string
while(output[i]) nybbleOut(output[i++]);
i = 0;
However, I can not assign a literal value to the string like:
Code:
output = "Hello, world";
I have the output assigned as a character array. Why can't I just assign the string like above? What does "const rom char*" mean? I tried looking inot the user's guide, but it does not explain it well enough for me to understand. Thanks.