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

SED1335 GLCD problem :(

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







SED1335 GLCD problem :(
PostPosted: Sat Jun 20, 2009 1:44 am     Reply with quote

Help, I'm stuck. I connected the SED1335 based EW32FA0FLW (datasheet: www.acds.fr/pdf_produits/EW32FA0FLW.pdf) to PIC 18F452, all wiring is correct and double checked, I modified sed1335.c to match control lines I connected (on port B, port D is data). Didn't forget to call glcd_init(ON). My problem is that only backlight comes alive, absolutely nothing on LCD can be seen ... what am I missing, any ideas or hints where to look?
Guest








PostPosted: Sat Jun 20, 2009 4:45 am     Reply with quote

Update: LCD now shows only garbled text - random black and white pixels. Any ideas what to check?
sliders_alpha



Joined: 03 Mar 2008
Posts: 55

View user's profile Send private message

PostPosted: Sat Jun 20, 2009 3:16 pm     Reply with quote

i use those driver with a RA8835 : http://www.ccsinfo.com/forum/viewtopic.php?t=34970&start=30

and was getting the same problem, the CCS init is wrong, layer are not defined correctly (text and graphic layer) and their fillscreen and filltextscreen are also wrong.

use this instead :

init :

Code:

void glcd_RAinit(void)
{
 
   output_high(GLCD_RST);
   output_high(GLCD_CS);
   output_high(GLCD_RD);
   output_high(GLCD_WR);
   
   //system set
   glcd_sendCMD(0x40);
   DATA_MODE                           
   glcd_sendByte(0x30);
   glcd_sendByte(0x87);
   glcd_sendByte(0x07);
   glcd_sendByte(0x27);
   glcd_sendByte(0x2F);
   glcd_sendByte(0xEF);
   glcd_sendByte(0x28);
   glcd_sendByte(0x00);
   
   //scroll
   glcd_sendCMD(0x44);
   DATA_MODE                           
   glcd_sendByte(0x00);
   glcd_sendByte(0x00);
   glcd_sendByte(0xF0);
   glcd_sendByte(0x80);
   glcd_sendByte(0x25);
   glcd_sendByte(0xF0);
   glcd_sendByte(0x00);
   glcd_sendByte(0x4B);
   glcd_sendByte(0x00);
   glcd_sendByte(0x00);
   //HDOT SCR
   
   glcd_sendCMD(0x5A);
   DATA_MODE                           
   glcd_sendByte(0x00);
   
   //OVLAY
   glcd_sendCMD(0x5B);
   DATA_MODE                           
   glcd_sendByte(0x01);
   
   //erase all screen
   FillGraphic(OFF);
   FillText(' ');
   
   //DISP ON
   glcd_sendCMD(0x58);
   DATA_MODE                           
   glcd_sendByte(0x56);
   
   //CSRFORM
   glcd_sendCMD(0x5D);
   DATA_MODE                           
   glcd_sendByte(0x04);   
   glcd_sendByte(0x86);
   
   //DISP ON
   glcd_sendCMD(0x59);
   
   //CSDIR
   glcd_sendCMD(0x4C);
   
   //CSRW
   setCursorAddress(0x0000);
}


fillscreen :

Code:


#define COMMAND_MODE   output_high(GLCD_A0);
#define DATA_MODE       output_low(GLCD_A0);

void setCursorAddress(int16 addr)
{
   int8 adress;
   glcd_sendCMD(0x46);
   DATA_MODE
   adress = addr & 0xFF;
   glcd_sendByte(adress);
   adress = addr >> 8;
   glcd_sendByte(adress);
}

void FillGraphic(int1 parameter)
   {
   long count;
   //set cursor to 2580h
   setCursorAddress(0x2580);
   //put 00h in all graphic space
   count = 9600;
   glcd_sendCMD(0x42);
   DATA_MODE
   while(count != 0)
      {
      glcd_sendByte(0xFF * parameter);
      count--;
      }
   }
   
void FillText(char cara)
   {
   long count;
   //set cursor to 0000h
   setCursorAddress(0x0000);
   //put 00h in all text space
   count = 1200;
   glcd_sendCMD(0x42);
   DATA_MODE 
   while(count != 0)
      {
      glcd_sendByte(cara);
      count--;
      }
   }


when you'll make it work, could you try to draw a circle (with graphic.c) and tell me if it works?
_________________
yup, i know, i don't speak english very well

CCS V4.057
Guest








PostPosted: Mon Jun 22, 2009 7:03 am     Reply with quote

Hello! I managed to get it to work after painstakingly going through the datasheet and doing my own init sequence and writing my own send/receive and glcd_pixel routines, now graphics.c works with my library and all is well! And yes, drawing a circle works too! Smile
sjharris



Joined: 11 May 2006
Posts: 78

View user's profile Send private message

PostPosted: Tue Aug 11, 2009 3:40 am     Reply with quote

Care to post the INIT code??
Thanks
SH
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Aug 11, 2009 9:41 pm     Reply with quote

Post it in the code examples.. not here. :D

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
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