Try this technique which only uses 1 o/p line from a PIC: clock at high speed a square wave from the PIC to the gate of a MOSFET - the source of the FET to ground and the drain to the audio line from a preamp. This line is cap coupled and has a 22K in series. The audio line then goes to a 10KHz lo-pass filter (24db slope) then to an amp. This filters out the HF square from the PIC which is now chopping the audio signal. As you alter the mark space ratio of the square wave (oscillating at about 80KHz or more if possible) the volume will change. I think that I saw this in a paper by John Lindsey-Hood. I am doing the same so if you have another suitable answer, please let me know. ----- Stephen H Alsop ----- email: s.ssystems@easynet.co.uk www : http://easyweb.easynet.co.uk/~s.ssystems S&S Systems Ltd, Bretton Court, Manor Road, Wales Village, Sheffield S31 8PD, England. Tel: 01909 773399 * Fax: 01909 773645 ---------- : From: R.J.D. Smith <94rjds@eng.cam.ac.uk> : To: Multiple recipients of list PICLIST : Subject: Volume Control : Date: 20 January 1997 18:58 : : I have been an observer of the PICLIST for many months whilst working on : my first PIC project, and am now seeking some help ... : : I am wanting to use a 16C84 to provide volume control to a simple audio : amplifier (microphone input, speaker output). : : I already have the 16C84 connected to an LCD driver using an I2C (IIC) : bus, and an elegant solution seems to be to use an I2C audio preamp. : : I have a list of some possible devices (from an I2C databook): : : TDA 8405 : TDA 8420 * : TDA 8421 : TDA 8425 * : TEA 6100 : TEA 6300 : TEA 6310T : : The trouble now is finding a (UK) supplier. Some of these devices have far : more functions than I need (I only want [mono] volume control!). : The only one I have managed to locate is the TEA 6300 (which has many : features and a large price tag [8 pounds]). The *'d items are the : simplest, most suitable and hopefully cheapest [around 2 pounds?]. : : Does anyone know where (in the UK) I could get these? : : Alternatively, can anyone suggest any other methods for providing volume : control? : : I thought of using an I2C DAC and using a voltage-controlled amplifier. : I have very limited I/O left on the 16C84 (only 1 or 2 pins) so I2C is : preferable (already implemented). : If (as I suspect) anyone has already come up with a solution to this : problem their advice will be greatly appreciated. : : (Volume control can be fairly crude, say minimum 8 levels (3bit), with : muting option preferable) : : Thanks, : : Richard Smith : Cambridge, UK