Introduction - If you have any usage issues, please Google them yourself
This is the code for a function generator (sin, cosin, triangle, pulse), you can variate the amplitud and the frequency, it is developed on ICCAVR, for any doubts I have the simulation on Proteus too.