??? 01/09/09 22:02 Read: times |
#161395 - SORTED ! :) Responding to: ???'s previous message |
The key was "dummy data read", i was just fiddling with sequence of operation of en, rs, rw etc, and 1 combination worked! ... searched lot of internet. now it can read perfectly. Everything sorted out now.
Thanks David for ur kind help. The dummy data read is shown in the code below: unsigned char lcdread(unsigned char page, unsigned char column, unsigned char chipselect) { setpage(page, chipselect); //shud be self descriptive setcolumn(column, chipselect); ldata=0xFF; //make I/P port to read data en=0; rw=1; // now reading from the LCD rs=1; //data if(chipselect==1) // if in Left half of LCD { cs1=1; cs2=0; } else //nahi to right half { cs1=0; cs2=1; } en=1; //now data wud NOT have come to port /*===================Double Data Read===================*/ en=0; //this made my lyf hell for 3 days, JUST this! if(chipselect==1) // if in Left half { cs1=1; cs2=0; } else // right half { cs1=0; cs2=1; } en=1; //now data wud have come to port return(ldata); //LDATA IS P3 OR WHATEVER... } -Regards, Munish |
Topic | Author | Date |
Ks0108 Graphics LCD read problem | 01/01/70 00:00 | |
You need to obey the data sheet. | 01/01/70 00:00 | |
I tried all things but... | 01/01/70 00:00 | |
Using bit masks. | 01/01/70 00:00 | |
SORTED ! :) | 01/01/70 00:00 | |
Your strobe still leaves EN true | 01/01/70 00:00 | |
Prhps other functions take care of it...![]() | 01/01/70 00:00 |