LCDInfo.com

http://www.lcdinfo.com
It is currently Sun Nov 24, 2024 12:03

All times are UTC + 2 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Mar 02, 2005 6:28 
Offline

Joined: Tue Aug 24, 2004 9:35
Posts: 10
Hi Everybody
I have difficult to write C code to check the status of the T6963c.
I Write the code below, and I do not understand why it does not work?

unsigned char lcd_read_status(void)
{
unsigned char status_data;

PRT2DM0 = 0x0F; //Set port 2 to output (first 4 bits)

PRT2DM1 = 0x00; //Set port 2 to output (first 4 bits)

PRT2DR = (CD_1 | CE_0 | RD_0 | WR_1);

wait(3);

PRT1DM0 = 0x00; //set port 1 to input

PRT1DM1 = 0xFF; //set port 1 to input

status_data = PRT1DR; //store the status data

PRT2DR = (CD_0 | CE_1 | RD_1 | WR_1);

return status_data;
}


Do I set the CD, CE, RD, and WR right?

CD_1, means set CD high; CD_0 means set CD low, and so on.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 22:58 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
It's been a while since I've worked with T6963C controller. But the source code for this should have some busy reading stuff in it:
http://www.skippari.net/lcd/testprog.html

I don't know if you have read this document but maybe it can be of help too:
http://www.skippari.net/lcd/t6963c.pdf

How long is your wait ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 15, 2005 2:54 
Offline

Joined: Wed Dec 01, 2004 8:47
Posts: 13
i am not sure where you call the function from.
Did you check,some where,for the last two bits(bit 0, bit 1) if they are both on (11)? and the waiting between reading is also critical. T6963C datasheet has a very clear instruction how to do this.
Hope this help,


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group