thanks guys, but few problems seem to have arisen:
TCCR0B = TCCR0B & 0b11111000 | 0x01; // <------ compiler shows error, says there is semicolon required at the binary value,,, but seems to compile , so maybe we dont need to worry, plus my delay is timed out by ear with original track and even though only 5 or 6 seconds long in total offset is only 1second, so close enough that i should be able to make out words
TCCR0B = TCCR0B & 0b11111000;// | 0x01; // <----- even if i do this
but also I should have mentioned mega2560, it seems analog write is not an option for me, but thanks for pointer as i read a bit about it but didnt realize it was for pwm pins,
maybe a capacitor for filter(?), amp not required, since its very tiny speaker, and seems to resonate better at 700hz, as it gets loud enough to bother me enough to unplug, although i think about it maybe i pulled a speaker out of junk box that has no chance:
My BIGGER problem now is that just for test i decided to output word values to serial port:
Serial.println((String)ctr + " " + word + "\r\n");
but it seems there are alot of false values coming out , such as a series of:
10941 44
10942 44
10943 44
10944 44
10945 44
10946 44
10947 44
10948 44
10949 44
or:
6466 0
6467 0
6468 2
6469 0
6470 0
6471 2
6472 2
6473 0
6474 0
6475 2
but nothing like that in the recording1.H ....?
Also it is to my understanding that wav value is instantaneous , while pwm is over time.,, ie
a 60hz square wave would look like this:
in PWM : 60
in ADC: 0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,