Converting a code from AVR to arduino

It might be easier to say what you want the program to do and just write a new Arduino program.

...R