??? 01/11/09 13:08 Read: times |
#161420 - Prhps other functions take care of it... Responding to: ???'s previous message |
But why should we want the chip in a three state... and what should be in 3-state, the data or the control lines? (I guess you mean data lines.) The Data and ctrl lines are directly connected to Port pins of the uC. I connected LCD data pins to P0 initially, but then I had to add pullups (to P0), when it didn't work, as P0 is open drain. Control lines are connected to P2, so they can't be in 3 state either.
Okay, I guess you meant: "If we leave en high, the data would be continuously forced out of the chip and then when the uC tries to feed data to it, there would be trouble..." Is that it? About control lines, I tried to stick to what the (KS0108) datasheets said abt the timing of ctrl signals : MPU read: en is (showed) high initially, then we make it low to set rw, cs1, cs2 & rs and then high again to put data on the data lines and then take en low again. MPU write: The waveform for en starts from high and in the end it's again high ! I have made en=0 in the start of other functions like lcddata() since putting en=0 after return(ldata) in lcdread() will have no effect. That should bring the chip in tristate. And AFTER lcddata(), en is low. And even if I leave en high, is there any possibility that the O/P of the lcd data lines would differ from data on port at that time? If it does not differ, then it should be perfectly okay to put en=0 in the end of one function, or in the beginning of the other because data remains the same midway as that from the uC... |
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 |