Hello there I am developing using MPASM and ICEPIC emulator v1.63.20. I am currently working on a module to control a motor for endurance testing. The idea is to run the motor, alternately, in one direction and then in the other, keeping a count, until the motor fails. My code works fine for a random number of counts and then the TRISA, TRISB and TRISC registers get corrupted. They are corrupted to the same values every time. I have gone through my code exhaustively but cannot find any obvious bugs. Doe anyone know how I can set a break point or trace on a register value to stop the program execution the moment one of the TRIS registers changes value. Everytime I try and set a trace in the ICEPIC emulator I get a serial port error. The serial port works fine otherwise. I see also that ICEPIC can be controlled from within Excel using VBA modules. I have played with this but the ICEPIC manual does not give too much detail about using this feature. I have thought of running the emulator in animation mode and just watching the TRIS registers to see when they change but the animation is too slow for the execution of the program. The motor has a finite degree of travel and gets overloaded if the motor is driven after it has reached its full extent of travel in that particular direction. If anyone has any ideas or can refer me to more information on debugging with ICEPIC I would be much ablidged. Thanks in advance. Martin McArthur