Yigit Turgut wrote: >>>>Input : 40mv - 111mv Output : 1V >>>>Input : 112mv - 214mv Output : 1.5V >>>>(unspecified) >>>>Input : 280mv - 400mv Output : 5.0V >> >>>use an A/D with sufficient bits to get desired number output steps >>>tied to D/A with same number of bits >> >>Hi Robert, the steps Yigit has indicated above don't suggest a linear >>relationship. If it isn't log either, then something with smarts is going >>to have to translate A programmed EPROM. A/D = address. D/A =data for D/A. A PIC would be easier to 'tweak'. >>Yigit, can you detail the input ranges and voltage out for each please >> >>You haven't said what 'quality' of output voltage (eg PWM ripple, >>precision) you want and how quickly > > > Well deadline is monday. You're going to have fun meeting that. School project/assignment? > Exact values are like these ; > > Input : 30-57-130-202-270-330-380-422-460-492-520 (mV) > > Output : 0 - 0.5 - 1 - 1.5 - 2 - 2.5 - 3 - 3.5 - 4 - 4.5 - 5 (V) > > 11 values for both.First I will put an offset with a SGA to get 0 for > that 30mv input.And then I am planning to use a non-inverting > (probably) LM358 gain amplifier.Since the graph is > > http://img441.imageshack.us/my.php?image=graphprcjt01es8.jpg > > seems like it can be operate -almost- linear. Quite an odd shape. Something like a brightness correction curve for a lamp dimmer. Is the output really SUPPOSED to be step wise? That is NOT what your graph shows. It shows a incremental output for every input value, not a fixed one. > But of course I do have time to adapt it to PIC and it would be really > good since I can get precise output with it. PIC A/D. Use lookup table (or if-then-else tree) to create D/A value to use in software or hardware PWM to get you a 1 pin output. Lots of software PWM code out there. Robert -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist