| Posted 30/07/12 at 05:12 PM||Reply with quote #1 |
I've just started using a uLCD-32PT connected to a STM32 micro-controller. I have found that if I send two commands in rapid succession the second command is ignored. As it happens the first command is clear screen ($45). A 50ms delay is enough. I see no mention of this in the manual. How long a delay is enough? Is there some way to poll the display to determine if it is ready yet?
I am waiting for the ACK to come back from the clear screen command before sending the next command.
| Posted 30/07/12 at 05:42 PM||Reply with quote #2 |
|All you have to do is wait for the ACK, no delay is needed.|
Of course you need to wait for the ACK to the command you just sent and not the ACK to a 'previous' command, or some response to an accidental 'extra' command.
| Posted 30/07/12 at 06:08 PM||Reply with quote #3 |
|You are right, I have added some code to empty my receive buffer before sending a command and now it is working without any delay. There must have been an extra "ACK" somewhere so I wasn't waiting for the command's "ACK".|