Darrel,

If using an LED its hard to make it lock. I think its either related to the power supply I'm using, or some other factor within the circuit as it does it on several loco's. I have a 0.1uf spread accros the power pins of the PIC, and power rails in a bid to decouple the supply. I've also tried changing the 1K base resistor between the NPn and PIC output as I though that the driver circuit may be drawing more than the 25ma the port can take, but that made no difference

Is the PWM outout a square wave, sawtooth or just spikes that are increased in frequency? I would like to stick with PWM as there is less heat to dissapate in the circuit and it provides far better slow starts than varible voltage type controllers. Maybe I should look at using a PIC with hardware PWM, like the 16F690 ??