This is a simple Project playing a tune using a normal port pin, and not the PWM to generate sound. Currently it plays "The flight of the bumble-bee", but this can of course easily be changed. For good result you should filter the output, but if you use a good old fashion loadspeaker of poor quality these are usually so bad that it sounds ok as it is...
The project contains everything needed, also a ready-made .hex file that you can download directly to a AT90S8535. The program can be ported to most (all?) AVRs.