The simplest way to do this would be to add a counter variable that you increment once every time you check the LCD module. If the counter exceeds a certain value, then you assume something wrong with the LCD module and take appropriate action. Just make sure that the value is high enough that you allow plenty of time for the LCD to finish if it is working correctly. You might have to make it 16 bits, depending on clock speed and how long the LCD normally takes to write. Daniel Imfeld On Saturday, March 15, 2003 12:33 PM, Thomas N wrote: > 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 > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.