Converting a piece of PIC code to Arduino

jremington:
Why are you doing this? Why not just use a PIC?

Good question.

We await the answer with great interest ....................