LCD routine Lockup
LCD routine Lockup
(OP)
Hi everyone,
My LCD routine checks the busy flag of the LCD and make sure the LCD is not busy before writing new data to it. Therefore, if there is something wrong with the LCD module, my system hangs because it keeps checking and waiting for the LCD to be ready. Is there a way around this? Thank you for your help!
Regards,
Thomas
My LCD routine checks the busy flag of the LCD and make sure the LCD is not busy before writing new data to it. Therefore, if there is something wrong with the LCD module, my system hangs because it keeps checking and waiting for the LCD to be ready. Is there a way around this? Thank you for your help!
Regards,
Thomas





RE: LCD routine Lockup
If your code is written in C and the compiler is optimizing, then I suspect you forgot to put your pointer as volatile.
Intead of declaring your pointer as
int *pointer;
Use
volatile int *pointer;
This will tell the compiler to read the content pointed by the pointer everytime although the execution code is not modifying it.
TiL