Recently I put this simple program together to move an s3003 Futaba servo approximately 180 degrees clockwise and back 180 degrees counterclockwise with one push of a momentary switch. I am using the MCLRE pin to reset program when needed. The program does as I expect but the way that I have it is that I cannot get out of the counterclockwise programming to a sleep instruction without screwing up the counterclockwise section of the program. My experience is very limited in programming so I thought I would post this for a little help which would be appreciated very much. Thanks in advance for any help that I may receive. I have attached the source code.
Code:
[ATTACH]50650[/ATTACH]