Hi, I had a similiar problem a while back on two differnet projects, with both the 16F877 and 16F876. I'm using the HI-TECH C compiler. I was using a LCD and serial port, but the code seemed to lock up for some reason. After removing the serial port initialise funtion, the program worked again. It seemed to me that the sequence in which the registers of the serial port was initialised was important. I changed the sequence the registers are set and the code worked! Had no problems since then. Doesn't make sense, but it worked. Maybe try removing your serial port initialise function, or disable it and see what happens. Hope it helps! Good Luck! >>> irule@IRULE.NET 2001-05-07 10:54:32 >>> OK im past frustration and on the verge of writing this crap over from scratch. Im working on a program that controlls a LCD and communicates to a PC via rs232. The PIC as a 16F877. The problem I'm having is when telling the pic things to send the LCD, it locks up and stops responding to anything. It seems somewhat random when exactly it locks up. On lockup the USART TX line tri-states(?) (neather high nor low)...and I lack any debugging tools so I cant see wtf is going on. I'm allmost positive its a software thing because I use the PICLOADER bootloader, and it uses the rs232 i-face for writing the program, and it works just fine. If anyone would be willing to look over my program please let me know..Its kinda large, but alot of it is commented out in my attempt at finding the problem. Assembled it uses a little over 1K of program space. Please anyone who is willing to help out a newbie please speak out. MUCH thank-you in advance, Tim Thompson - Remember, 'kill' doesn't kill processes, users kill processes. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads