On Sun, 13 Jun 1999 13:59:14 -0600 Graeme Smith writes: >Anyway, problem is, I burned out before I got to understanding active >analog circuits very well. Now I have a function I want to play with, >that might be more efficient as an analog circuit... The approach you suggest is not practical. It is difficult to get any analog circuit to work to more than 12 bits or so of precision. A circuit that multiplies two variable voltages together cannot be realized with just op-amps (unless tricks are used). Analog multiplier ICs are made but they are kind of specialized and expensive and introduce several more types of error. So you're far, far ahead to do the math in software. >It involves floating point multiplication so its probably too >expensive >timewise for a PIC. A PIC should be able to do this type of operation about 1000 times per second with nothing too specialized. The figure of 1000 evaluations per second is based on running the PIC at 20 MHz; there are 5000 instructions to do each evaluation. (As an aside, making the analog version work much faster than a few KHz will significantly complicate it). If higher speeds are needed then consider a microcontroller with multiply hardware built in. Most of the PIC 17CXXX's have this, as well as a more effective way to place tables of data in the program EPROM. But they are also rather expensive and quirky so you may want to consider a different brand of processor. The various DSP chips are highly optimized for multiplying 16 or 32 bit numbers quickly. If you provide some more details of the formula and the size of numbers to be used, some of the list's numerical experts could probably suggest ways to optimize the computation. My first advice would be at least for now to forget about floating point. It is very rarely necessary in microcontroller applications since the range of values at each step in the process can be determined beforehand. Use binary integers that are scaled so the formula works properly for all possible inputs. ___________________________________________________________________ Get the Internet just the way you want it. Free software, free e-mail, and free Internet access for a month! Try Juno Web: http://dl.www.juno.com/dynoget/tagj.