Jump to content

16F628 and const char pointers


Recommended Posts

  • 3 weeks later...

Yes,I had.

Using the LCD_Lprintf function:


void LCD_Lprintf( const char *lcdptr )


 char pi;

 pi = 0;                                        // Check for end of string

   while( lcdptr[pi] !=  0)


           LCD_Write_4_Bit( lcdptr[pi++] );// Display on LCD




with something like:


LPrintf("Test again");


System reatarts or behaves weird after printing the first string correctly.

I tried saving the strings in the EEPROM, pointing to the fisrt char and using putchar() in a loop instead and it worked.



Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...