??? 07/11/10 06:16 Read: times |
#177230 - LCD display delay problem? Responding to: ???'s previous message |
Is it possible that the LCD code delay is greater than the data transfer time, ( and maybe therefore, the gibberish on the LCD screen)?
Here are some observations I made earlier... This is the code I'm using to display data on the LCD. void lcddata(unsigned char value) { ready(); rs=1; rw=0; en=1; lcd_port=value; en=0; return; } void ready() { busy=1; rs=0; rw=1; while(busy==1) {en=0; en=1; } return; } Here's a bit of math I did to determine the delay I have between two consecutive data acquisitions... 4800 bits in one second 8 bits in 1.67 milliSec. Thus i have around 1.6 ms before the next byte comes into the SBUF. Therefore the delay of the above code must be <=1.6ms. But when I used the Keil debugger to find out the delay of the above functions...I found it to be 8.4 microseconds(but I don't know whether I did it right.)So according to my calculations, the lcddata() function isn't a culprit. |