> I believe it's a frame of 50 per second for it. Might want to=20 > check this out to be sure. The standard is I believe 50 with=20 > a 15ms center point PW but I've been wrong before :) Yes, your right, it is 50 per second or 20 ms. And a 1.5 ms pulse=20 should center the servo. > For computing volume, I suggest first rectifying the input=20 > signal using a bridge to get your DC offset. Then instead of=20 > using the linear voltage use a logrythmic scale to determine=20 > your magnitude. You can find A-law and u-law linear to=20 > logrythmic scales on the net. I suggest you use there=20 > interpreted values. Are you planing on 8/10/12 bits of=20 > resolution for your input sense? The other option is more=20 > complicated that is putting a logrythmic amp in the signal=20 > path (and less useful). You want to basically get your=20 > numbers in some sort of db scale (I believe A-law matches=20 > this). Then you can do it by 'eye', IE observe adjust and=20 > make it look right. Okay.. Now we're getting into the part where I am lost at..=20 Lets see, your suggesting using a bridge rectifier to remove the=20 lower half of the wave so the voltage is all positive. That makes sense. And then use a resistor to limit the Voltage to <=3D Vdd.=20 So that handles conditioning the audio signal for the PIC.. now the=20 hard part.=20 Then you suggest based on the voltage, use a logrythmic scale to=20 produce a value that is ramped up based on the amplitude. Okay..=20 couple of minor issues, I don=92t have the faintest clue about=20 logrythmic scales (beyond the fact that they are logrythmic:) and implementing them in a PIC, and I don=92t have any experience=20 using the a/d converter. I am going to use a 16F877A for this=20 project. The data sheet indicates that it can do 8 or 10 bit=20 resolution. I am not sure why I would choose either one or the=20 other but based on what I understand, 8 bit would be more=20 then enough for sampling the audio signal, since I am only=20 updating the servo every 20ms, and the PIC can sample at=20 a much higher rate it appears. An average amplitude over=20 that 20 ms period (with many samples) would be great to=20 calculate and give the most accurate result, but one sample=20 of the amplitude every 20 ms is probably good enough for=20 this purpose.=20 Any websites, tutorials, examples I should look at to really=20 learn from scratch about implementing logrythmic scales in a PIC and using the A/D converter at 8 bit resolution?=20 Anyone have any sample code they could share?=20 Can anyone else fill in some more blanks?=20 Ya'll are a big help to a newbie like myself. It seems=20 as though this project might just be possible based on the=20 help ya'll are providing.=20 > Sounds like fun, now all you need are servo's to make the=20 > eyes move and track using a pair of itnernet cams and you can=20 > have a nifty thing to freak the neighbors out. ;) Heh.. that would be wild:) A bit beyond a PIC's capability to=20 track a moving object however. Actually.. something that might=20 be done with a PIC is to interpret a pair of microphones resulting in a stereo sound, and using the difference between the sounds=20 to determine where to move the eyes to (left, right, or center).=20 Hmm.. Maybe that will be my next project:) Anyway, thanks for the=20 help so far.=20 Anyone else have any advice, ideas, howtos, sample code, working schemati= cs:) Hehe. I need all the help I can get.=20 Thanks,=20 Mike =20 _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist