<p>Hey Robby did you try asking the sfmicrocontrollers yahoo group?  It's a great resource for answers to questions like yours. </p>
<p>Whats this 64mhz pwm on an tiny85 about anyways?</p>
<div class="gmail_quote">On Jul 8, 2012 1:00 PM, "Robby" <<a href="mailto:robwasab@gmail.com">robwasab@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello y'all,
<div>I'm depressed, see, I can't get my micro to play back recorded audio samples, here's what I've been doing and from what I can tell, the internet says todo:</div><div>using an tiny85 I'm using its 64Mhz PWM with a low pass filter to create analog voltages, I can create a sine wave using a 256 byte lookup table I use 256 resolution because I do this:</div>

<div><br></div><div>OCR1B = pgm_read_byte[sinWaveTable + TCNT0]; //The timer speed is the speed at which the wave table is played back</div><div><br></div><div>And it makes a really good sin wave (used an oscilloscope to verify this). </div>

<div><br></div><div>however, this shows that I can create relatively good analog voltages, I cannot play back sounds that I've saved in the avr's flash. </div><div><br></div><div>to do this, I have converted an arbitrary sound file to .WAV (uncompressed) further converted it to 8bit sampled at 6khz. So each byte in this file corresponds to a sinusoidal sound wave point, and all i have to do is play back each analog value at the speed of the sampling rate. (please verify me on this?) makes sense. I open the WAV file in a java program that I wrote that reads each byte and separates them with commas so that I can make an array out of the data. </div>

<div><br></div><div>And I just play it back, I tried to use a Compare Match A interrupt to read each array value (at the sampling rate hence the compare match interrupt) and change analog value coming out of OCR1B but it sounds like SHIT, I can't even tell what it sounds like. </div>

<div><br></div><div>If anybody has had experience with this approach maybe you can help me?  </div>
<br>_______________________________________________<br>
Noisebridge-discuss mailing list<br>
<a href="mailto:Noisebridge-discuss@lists.noisebridge.net">Noisebridge-discuss@lists.noisebridge.net</a><br>
<a href="https://www.noisebridge.net/mailman/listinfo/noisebridge-discuss" target="_blank">https://www.noisebridge.net/mailman/listinfo/noisebridge-discuss</a><br>
<br></blockquote></div>