Also, eliminate most of the non necessary routines for this debugging time, bypass them with jumps. If using AC power adapter, move to battery during the debugging. If connected to other equipment, make sure ground lines are really tied and with solid connection, using large copper area larger than the signal wires. if necessary use shielded cable to do it. Try to eliminate all the external connections by simulating them on board, using resistor dividers, etc. Try to display important counters on some LCD for debugging purposes, sometimes some counts get off limit and it messes with the program logic. Make sure the program is reseting all counters to a known value at power on reset routine. as Rich said below, missing or wrong decoupling caps at the cristal input pins. Wagner. Richard Prosser wrote: > 1. Power Supply Variations outside expected limits (transients etc) > 2. Interrupts (Intentional or not) and how they are handled.. > 3. Input pins changing into output pins (& driving a low impedance) > 4. Floating pins defined as inputs & susceptable to exernal noise/ > RF/static > 5. External harware driving pins outside the limits. > 6. Clock/Xtal problems. > > If you still have problems we might need a bit more info as to the > application / environment etc. to suggest something deeper. > > Richard P > > > > > > > After chasing a random crashing problem on a 16F877 project for days > now, I've run dry of troubleshooting strategies (not that I had very > many sensible ones to begin with). In short, my project will perform > certain operations flawlessly sometimes, then fails spectacularly on > the 'n'th attempt, with 'n' generally residing between 1 and 10. My > inexperience has likely led me to commit some programming faux pas I > just can't spot. To help get me unstuck, would any of you gurus be > willing to complete the phrase; > > "When my program blows up randomly, the first thing I look for is..." > > Thanks in advance! > > Rob Robson > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Wagner Lipnharski - UST Research Inc Orlando FLorida - USA - www.ustr.net /_/_/_/ Atmel AVR Consultant /_/_/_/ -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu