Alvaro: I do believe that the code you posted will help me. I am fairly new to the PICs but have determined that they are a much more cost effective way and that they perform much faster than a "STAMP". Therefore I am attempting to use them in a controller for a single axis CNC application. Thanks for the reply. Randy A.