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

help me for read data from 320x240 GLCD, platform c6713dsk

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



Joined: 10 Aug 2009
Posts: 1

View user's profile Send private message

help me for read data from 320x240 GLCD, platform c6713dsk
PostPosted: Mon Aug 24, 2009 5:25 am     Reply with quote

Dear Friends

I am using 320x240 Graphical LCD display & my platform c6713 dsk kit. I have interfaced GLCD with dsk through EMIF. During establish program code, one if library function(read data function) make a big trouble.
I want to set a pixel on particular addresses. just see below as an example ..

void GLCD_SetPixel(unsigned int x,unsigned int y, int color)
{
unsigned char tmp = 0;
unsigned int address = ((0x04 << 8) + 0xB0)+(40*y)+(x/8)
///////////////////////////SED1335_GRAPHICSTART + (40 * y) + (x/8);

GLCD_SetCursorAddress(address);
glcd_cmd(0x43);
tmp =GLCD_ReadData();

if(color)
tmp |= (1 << (7 - (x % 8)));
else
tmp &= ~(1 << (7 - (x % 8)));

GLCD_SetCursorAddress(address);
glcd_cmd(0x42); //GLCD_WriteCommand(0x42);
glcd_writedata(tmp); //GLCD_WriteData(tmp);
}

For the above case, i need glcd_cmd(), glcd_writedata(), glcd_readdata() and glcd_setcursoraddress() to set pixel on x, y coordinate. I have build all of function myself except glcd_readdata() function. given below ..

void glcd_cmd(int cmd)
{
int j,i;
i= 0x001F0000; //A0 High, Reset and RD high
*output=i;
i&= 0x001F0000; //A0 High, Reset and RD high
*output=i;
cmd=cmd<<(24);
i|=cmd;
*output=i;
i&=0xFFF30000;
*output=i;
for (j=15;j>0;j--);
i|= 0x000C0000;
*output=i;
for (j=15;j>0;j--);
}

void glcd_writedata(int data)

{
int j,i;
*output = 0x000F0000; //A0 Low.... Reste and RD high
i=data;
i=i<<(24);
i|= 0x000F0000;
*output = i;
i&=0xFFF30000;
*output = i; // CS and WR enable
for (j=15;j>0;j--);
i|=0x000C0000;
*output = i; // CS and WR disnable
for (j=15;j>0;j--);
}

void GLCD_SetCursorAddress(int addrl,int addrh)
{
glcd_cmd(0x46);
glcd_dat(addrl);
glcd_dat(addrh);

}



If you have this glcd_ReadData function code to read data from my graphical LCD 320x240 (sed1335). Kindly mind it, my platform is TMS320C6713 dsk kit & using EMIF port
EMIF define address ..
#define ADDRESS 0xA0000000
#define GBLCTL 0x01800000
#define CE2 0x01800010
int *output = (int *)ADDRESS;
int *gblctl = (int *)GBLCTL;
int *ce2 = (int *)CE2;
.
.
*ce2=0x22A28A22;
.
.
I shall be highly obliged if you kindly give solution about my trouble..
i wish your kind cooperation.

Regards .

Gopal Sarkar
Kolkata, India
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Aug 24, 2009 12:15 pm     Reply with quote

Quote:
my platform c6713 dsk kit.

"CCS" stands for "Custom Computer Services" on this forum.
You want the "CCS" that stands for "Code Composer Studio".
You are on the wrong forum. You need a T.I. forum.
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