View previous topic :: View next topic |
Author |
Message |
Guest #2 Guest
|
SED1335 GLCD problem :( |
Posted: Sat Jun 20, 2009 1:44 am |
|
|
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
|
|
Posted: Sat Jun 20, 2009 4:45 am |
|
|
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
|
|
Posted: Sat Jun 20, 2009 3:16 pm |
|
|
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
|
|
Posted: Mon Jun 22, 2009 7:03 am |
|
|
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! |
|
|
sjharris
Joined: 11 May 2006 Posts: 78
|
|
Posted: Tue Aug 11, 2009 3:40 am |
|
|
Care to post the INIT code??
Thanks
SH |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Tue Aug 11, 2009 9:41 pm |
|
|
Post it in the code examples.. not here. :D
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
|