Page 1 of 1

Buffer overflow or maximum turnaround time to receive char

Posted: Wed Jun 30, 2004 1:46 pm
by shasson
Hi,

I have noticed that the LCD I am working with ( GLK12232-25-SM ) can only be updated with new characters only so fast or it will error, showing the wrong character, on the wrong line or possibly even interpret the characters I've sent as a command (sometimes changing the baud rate, requiring a boot with the jumper set to reset the baud rate). I was wondering if there is a known frequency that the LCD can handle characters being sent to it? Is there a buffer? What is the length?

Here is the code I have been using to test the required delay between sending characters to the LCD. I have found that the NUMBER_OF_LOOPS needs to be set to approximately 1500000 to ensure that no errors will occur. This loop delay is still less than Sleep(1) though.

char TestChar[60] = "ABCDEFGHIJKLMNOPQRST01234567890123456789ZYXWVUTSRQPONMLKJIHG";


for(int z=0; z<500;z++)

{

SerialPort.Write(TestChar[z%60]);

long i,j,k;
k=5;
for (i=0; i<NUMBER_OF_LOOPS; i++)
j = k*i;

}

There is no huge issue with me using this delay, I just wondered if there was anyway to speed it up. I find it noticably slows down the test when appearing on the LCD.

Thanks.

Scott

Posted: Fri Jul 02, 2004 10:13 am
by Miles
Unfortunately this is a limitation of the display...We use an internal buffer that controls 96 bytes of information...For the time being this will your maximum performance... :)

Flow control or buffer fullness indicator for I2C and RS-232

Posted: Tue Jul 06, 2004 1:12 pm
by shasson
Hi,

I just wanted to confirm that there is no way to know how full the buffer is in both RS-232 and I2C modes, correct?

Thanks.

Scott

Posted: Tue Jul 06, 2004 1:46 pm
by Miles
The only way to know how full or empty the buffer is at any given time would be if you incorporated flow control mode. :)

Flow control mode / buffer

Posted: Fri Jul 23, 2004 1:08 pm
by shasson
However, the flow control mode is unavailable when using I2C.

I was wondering if anyone knew about how long it takes for the LCD to handle one byte in it's buffer? Or is that dependent on the type of instruction being sent?

Posted: Tue Jul 27, 2004 10:15 am
by Tom
The time it takes to handle one byte is quite variable depending on if
it is a command or character, and what command it is. Characters should
be fairly constant however, so you should be able to estimate the delay
required between characters.

In your code you use a for loop to create the delay. Depending on the
compiler this can cause some inconsistency when the compiler optimizes
the code. If you have a real time clock available to you try using a
timed delay, the results will be far more consistent.

time for LCD to respond with a buffer full byte

Posted: Fri Aug 20, 2004 9:56 am
by shasson
Hi,

When the LCD is in flow control mode and it realizes that it's buffer is full, how long does it take it before it sends out the buffer is full byte?

I have done some of my own experimentation and it appears to take about 50ms from when the LCD has received enough bytes to make it full to when I receive the byte stating that it's buffer is full. Is that a correct statement? Just wondered if anyone else had seen this to be true.

Thanks.

Posted: Fri Aug 20, 2004 4:59 pm
by Tom
Hi Shasson,

50ms sounds low.

What size of font are you using?

size of font being used

Posted: Sun Aug 22, 2004 8:58 am
by shasson
Hi,

I am using a 5x7 font (the small font provided).

Thanks.