![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
tvnorm Guest
|
LCD dislay troubles "Hello World" = "Hdlln Fn |
Posted: Mon Dec 05, 2005 8:10 pm |
|
|
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);
} |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Dec 05, 2005 9:07 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
tvnorm Guest
|
|
Posted: Mon Dec 05, 2005 9:25 pm |
|
|
That Got it!!!!!
Hello World never looked so nice.
THANK YOU |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|