HI all, I am making a small project in which i am using a 3.7v li-ion 2600mah Battery, 20x4 LCD, step up converter, mosfet, 89S52 and a keypad. my concept is to just print a command on LCD. so for that i wrote a command like... Code: printscreen("HELLO WORLD, HOW ARE YOU"); i prints absolutely fine. but the problem is it prints giving spaces in between like.... HELLO WOR LD, HOW ARE Y OU. why is it happing. i have connected my 89s52 directly to the battery so it keeps it always on. on keypress from keypad the stepup converter gets activated using a mosfet and supplies 5v only to LCD. data pins of LCD are connected to port1 of 89S52.
it prints perfectly in proteus without giving any spaces..... but it creates problem while i try to run the same in my circuit.
"it will not if you forget to masticate the connector."
I'll stick to chewing gum thanks.
Lots of funny things happens in wires.
- cross-talk since they work as transmit and receive antennas - reflections from impedance mismatch - transfer delays since the speed of light is finite - voltage drops from series resistance - rise times from capacitances - overshoot from inductances - energy consumption from charging/discharging the capacitances ...
when is a wire NOT a wire?
it is always NOT a wire, it is always a string of inductors interspaced with capacitors to the environment
Ah, those old ones are always the best!
do the length of the wires that i have connected my LCD and 89s52 creates a problem of course, if it is longer than the drive can handle.
"a wire is NOT a wire"
Erik
look at the data sheet. have you check you comply with the timing. the voltage must be right oand not to low or far. if it is too wrong it will not be 100% correct. did you check the initialiszation sequence. it must be right or it can be wrong. have you 100% check the code with the simulator. make sure timing is for the long delay. increased the input dial threshold of the timing routine. check the int overflow. when you have check every detail it will work or it will not if you forget to masticate the connector.
You definitely need to verify the timing of your signals, to fulfill the setup and hold times as specified in the datasheet. With "luck" it's sometimes possible to erroneously get it to work, even when the timing is broken.
So "but it works" doesn't prove something is correct. All individual requirements must be one-by-one explicitly verified.
Transmission line effect, skewing of data signals. Try delaying the CS, WR signal by a few uS.
do the length of the wires that i have connected my LCD and 89s52 creates a problem. i have two set of cable wires one 200mm long and one is 125mm long.... when i connect 200mm long wires the problem occurs.... but it works well with the shorter wire....
Assuming it is all 5V supply compatible, can you try the same code with the whole board and LCD running on regular 5V supply, without the MOSFET?
I have seen this before. Try with 5V instead of 3.7V
Maybe it is lower level code in printscreen. Sometimes the code might be using a buffer of a particular size and sending a buffer of data out. At which time it has enough characters it would printout. Then someone may have added a space to the output characters.
i have even tried adding a capacitor (0.1uf) between pin 1 and 2 of lcd. but adding a capacitor increaese the spaces more
View all questions in Keil forum