I can make some suggestions for improvements if you want. Like use GOSUB. Bye the way as you use HIGH and LOW the tris is set automatically and you do not need to set it in your code. If you used LED=1 and LED=0 then you have to set tris in your code.
Bookmarks