Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Hi PICsters, Lots of people have asked for it so here it is, a little analog output circuit for microcontrollers that covers the common voltage and current ranges used in instrumentation. Apologies for the hand drawn circuit. The input can be, for example, 0-5V analog from a DAC, or direct from a PWM output pin. The 1uF capacitor filters the PWM signal to make it smooth DC. With J3 ON the input becomes 1-5V to produce the offset zero ranges. The first op amp is the output driver, and its feedback path can either be voltage (J2 ON) or current (J4 ON). With J1 OFF the op amp gives a gain of 1, and with J1 ON it gives a gain of 2. With J4 ON, the second op amp provides current feedback for the first op amp. It acts as a differential amplifier, using the 100R resistor as a current sensing element. The 47R resistor does nothing except fix a linearity problem the circuit had at low outputs. Two 10k resistors were used in series just because 20k was not available. The jumper settings indicate how to select the desired voltage and current ranges. Hope the ideas in this circuit are helpful to you all. Brent Brown Electronic Design Solutions 16 English Street Hamilton, New Zealand Ph/fax: +64 7 849 0069 Mobile: 025 334 069 eMail: brent.brown@clear.net.nz Content-type: text/plain; charset=US-ASCII Content-disposition: inline Content-description: Attachment information. The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any another MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. ---- File information ----------- File: analog.GIF Date: 30 Nov 1999, 17:13 Size: 14285 bytes. Type: GIF-image Attachment converted: wonderland:analog.GIF (GIFf/JVWR) (000107F4)