Hi Friends
I am working newly on C6713 platform. I have interfaced 320x240 graphical LCD with c6713 through EMIF port.
With my program, i can write anything into GLCD, but i can't read data from GLCD. I have got sample program for read data function, but their used input(GLCD_DB0, GLCD_DB1, GLCD_DB2,..... GLCD_DB7 etc) , but this input function & GLCD_DB are unknown for me & i could not understand , how i define this GLCD_DB address for EMIF to read data from LCD.
I have given my sample code below....
---------------------
#define ADDRESS 0xA0000000 // header declaration
#define GBLCTL 0x01800000 // header declaration
#define CE2 0x01800010 // header declaration
int *output1=(int *)ADDRESS; // header declaration
*ce2=0x22A28A22; // Define it into the main function.
-------
-------------------------
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_dat(tmp); //GLCD_WriteData(tmp);
}
-----
unsigned char GLCD_ReadData()
{
int i=0;
char temp;
*output1=0x00190000;
temp=takedata();
for(i=15;i>0;i--); //delay
*output1=0x001E0000;
return temp;
}
-----
int takedata(void)
{
int data=0;
data += input (GLCD_DB0);
data += input (GLCD_DB1) * 2;
data += input (GLCD_DB2) * 4;
data += input (GLCD_DB3) * 8;
data += input (GLCD_DB4) * 16;
data += input (GLCD_DB5) * 32;
data += input (GLCD_DB6) * 64;
data += input (GLCD_DB7) * 128;
RETURN data;
}
----------------------------------------
Hope that the above my program description will help you to
understand my problem. i have GLCD_SetCursorAddress(), glcd_cmd(),
glcd_dat() function. but i don't have glcd_readdata function.
So i am trying to build this function my self. but input(GLCD_BD) function are undefine & i don't understand how i make it.
kindly help me ..
Regards
Gopal Sarkar
Kolkata, India