In the sample i can find only the code for pic controller.Ii need the code for atmega 8 or 32 with winavr

If you want redimade code then what exactly you are doing, No one will give you cade for uC which is of your type and even with the compiler you want because is noone is paid for that and no one has time to reframe it as per your need

So just convert PIC code to AVT it's too simple , i had it but i will not share as i have not tested it