How do you writing C code for reading status of T6963?
Page 1 of 1

Author:  lcduser [ Wed Mar 02, 2005 6:28 ]
Post subject:  How do you writing C code for reading status of T6963?

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);


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.


Author:  Henri [ Mon Mar 07, 2005 22:58 ]
Post subject: 

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:

I don't know if you have read this document but maybe it can be of help too:

How long is your wait ?

Author:  wanna [ Tue Mar 15, 2005 2:54 ]
Post subject: 

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,

Page 1 of 1 All times are UTC + 2 hours
Powered by phpBB® Forum Software © phpBB Group