CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

LCD Problem: Extra character at end of line

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Frozen01



Joined: 23 Apr 2009
Posts: 32

View user's profile Send private message

LCD Problem: Extra character at end of line
PostPosted: Sun Apr 26, 2009 5:30 pm     Reply with quote

Hello all,

I am trying to get an LCD working. It is a 16x2 HD44780 compatible display. I wired it to use the "lcd.c" driver on Using Port D. I can get it to work for the most part, but at the end of every string I display I get and extra "character" displayed.

For example want "Ready..." displayed it will show "Ready...@" the @ is the extra symbol(it actually isn't the @ it is something else, but I am just using the @ as a placeholder). Any ideas?

Here is the code:

Code:
#include <16F887.h>

#use delay(clock=4000000)
#include "lcd.c"

void main() {
while(1){
   lcd_init();            // mandatory
   delay_ms(2000);
   lcd_putc("\fReady...");  // nice and friendly
   lcd_putc("\nLine 2");
   delay_ms(2000);
   lcd_putc("\f");
   

}   
}


I am using CCS V 4.013
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Apr 26, 2009 5:51 pm     Reply with quote

You probably have vs. 4.013 which is a bad version. It has the problem
you describe. See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661&start=67
Frozen01



Joined: 23 Apr 2009
Posts: 32

View user's profile Send private message

PostPosted: Sun Apr 26, 2009 5:57 pm     Reply with quote

PCM programmer wrote:
You probably have vs. 4.013 which is a bad version. It has the problem
you describe. See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661&start=67


That was it. I added the extra line in the lcd.c file for "\0" and all is good.

Thanks!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group