Many thanks all. In general terms this is what I'll do. In the ISR() if( ReadCurrent() > CurrentLimit ) { //depending on speed value,=20 // overload could last up to a mS ... should be ok... RedLED =3D 1 ; ++OverCurrent ; CCPR1L =3D 1 ; // the next duty cycle is about 1% } else { // if there had been an over current then reset to normal RedLED =3D 0 ; OverCurrent =3D 0 ; CCPR1L =3D SpeedValue ; } In the SetMotorSpeed() routine (comes here regular and often) if( OverCurrent =3D=3D 0 ) { CCPR1L =3D SpeedValue ; } else { // decide what to do about it // ? check number of times ? } Dave --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .