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 support@ccsinfo.com

LCD dislay troubles "Hello World" = "Hdlln Fn

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







LCD dislay troubles "Hello World" = "Hdlln Fn
PostPosted: Mon Dec 05, 2005 8:10 pm     Reply with quote

I am trying to get a 2x20 LCD to work.
ITs an optrex with an NT 3881d driver, which as far as Ican tell is a Hitachi HD44780 clone. I can place charcter wherever I want, top row, bottom row, but some of the characters are always off. Looking at the standard character codes, the incorrectly displayed charcters are always to the left,right, top, or bottom of the intended character in the character table from the data sheet. This would seem to indicate a timeing issue to me, but I am new to pics and programming in C. I am usingLCD.c but modified to use all of portc, because that is the 8 bit port on p16f690.

Can anyone be of assistance?

#include <16F690.H>
#fuses NOWDT, NOPROTECT
#use delay(clock = 4000000)


#include <lcdportc.c>



//=======================

void main()
{

lcd_init();

lcd_putc("Hello World");

while(1);
}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 05, 2005 9:07 pm     Reply with quote

I don't know what compiler version you have, but I looked at the
.LST file for PCM vs. 3.240, and the CCS setup code is incorrect
for the comparator registers.

You should be able to fix it by adding the line shown in bold, below:

Quote:
void main()
{
setup_comparator(NC_NC_NC_NC);

lcd_init();

lcd_putc("Hello World");

while(1);
}

If that doesn't fix it, then post the version of your compiler.
tvnorm
Guest







PostPosted: Mon Dec 05, 2005 9:25 pm     Reply with quote

That Got it!!!!!
Hello World never looked so nice.
THANK YOU
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