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 non-native uart behave different with different crystal

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







lcd non-native uart behave different with different crystal
PostPosted: Fri Sep 04, 2009 7:36 am     Reply with quote

I'm using an 18f4620 for uart implementation and lcd driver, but the thing is that when I use a 8Mhz crystal with pll 4x the lcd(16x2) don't work properly, it start with the first line in black(sometimes). The strange is that if I declare just the clock as 8Mhz without pll the lcd works fine(always). In the other hand, when I work with 8Mhz and pll 4x a non built-in uart dont get the strings that it must catch but without pll it catch all the strings.


I measured with oscilloscope pulses of a simple pulse generator program in order to find out if the crystal configuration is not working, but it is ok, in both cases, with pll and without it.

The version of compiler is 4.088

Thanks in advance Sad
Ttelmah
Guest







PostPosted: Fri Sep 04, 2009 8:09 am     Reply with quote

Some of these text LCD's, take a little longer to wake up, than the original Hitachi implementation. My guess would be that yours is absolutely 'borderline', and takes just a few uSec more to start, than is allowed. Running at 8MHz, the code wll run just a tiny amount slower, and this may just be giving the extra time needed.
In lcd_init, lengthen the inital delay_ms(15), to 30 mSec. This seems to work with just about any LCD. In lcd_send_byte, and lcd_read_byte, try also increasing the 'delay_cycles' commands, from '1', to '2'. - the need for this, depends on the capacitance of the cabling to the LCD....

Best Wishes
jack1122
Guest







lcd non-native uart behave different with different crystal
PostPosted: Fri Sep 04, 2009 10:34 am     Reply with quote

Ttelmah
Thanks for your advice, but it seems not work, black line appear yet.

The lcd is a JHD162A, its datasheet mention that the controller it's a ks0066.

I'm going to try to increase a litle bit more the times that you mention to
see if it works. Confused


Thanks.
jack1122
Guest







lcd non-native behave different with different xtal(SOLVED)
PostPosted: Sat Sep 12, 2009 10:11 am     Reply with quote

Hi, just to say that with the last modification that I mentioned above the problem solved

Thank you, Ttelmah Very Happy
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