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

Display problem in GLCD without FAST_GLCD

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



Joined: 05 Dec 2011
Posts: 3

View user's profile Send private message

Display problem in GLCD without FAST_GLCD
PostPosted: Mon Dec 05, 2011 3:29 am     Reply with quote

Hello everyone;

İ'm using 18f452 at 20MHZ for driving 128x64 Graphic LCD, and my compiler's version is 4.120. Here is datasheet of glcd;

http://www.lehan-intl.com/pdf/17-LH12864A-2.pdf

İ can drive my glcd without any problem with fast_glcd function. But when try to drive it without fast_glcd function, characters in glcd are engaging and it doesn't display properly.

Does anyone have an idea?
tigiyko



Joined: 05 Dec 2011
Posts: 3

View user's profile Send private message

PostPosted: Mon Dec 05, 2011 5:04 am     Reply with quote

i found the solution. According to brand of glcd, time of responses change. For example the glcd which i'm using has 25ns rising and fall time. İf you dont add delay after enable and cs signal, glcd's controller couldn't catch mcu's speed. İ added delays which marked with *** symbols.

Code:
void glcd_writeByte(int1 side, BYTE data)
{
   set_tris_d(0x00);
   
   output_low(GLCD_RW);       // Set for writing
    if(side)                   // Choose which side to write to
      output_high(GLCD_CS2);
   else
      output_high(GLCD_CS1);

    delay_us(1);

   output_d(data);            // Put the data on the port
   delay_us(1);
   output_high(GLCD_E);       // Pulse the enable pin
   delay_us(1);
   output_low(GLCD_E);
   
   delay_cycles(5); // ***i added this delay
   output_low(GLCD_CS1);// Reset the chip select lines
   delay_cycles(5); //*** i added this delay
   output_low(GLCD_CS2);
}
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