Yigit Turgut wrote: >>>If number of steps allow, you can use LED bar=graph driver >> >>The LM391x or something like it did pop into my head but the full >>relationship between Yigit's input and output wasn't spelled out > > > Well,I am planning to get all the output from one pin.I actually > haven't heard of anything like this before since all things must be > handled by the software what is left is a bunch of "if's".As pseudo ; > > if(input<=112mv){ output=1v; } and so on.At the top of all the if's is the > > if{(input<=400mv) {output=5v; } > > is this code embedable somehow ? I mean can't I sense the input "values" ? Seems to me that the simplest solution to what he seems to be describing (variable voltage in converted to discrete steps of voltage out) is to use an A/D with sufficient bits to get desired number output steps tied to D/A with same number of bits. Scale up the input value to have it cover the required number of steps, and scale the D/A to get the output voltage range he requires for that number of steps. No PIC needed. If he really wants to use a PIC, he needs one with on board A/D, and either CCP/PWM output or software PWM to fake out a D/A (doesn't say how fast he has to do this conversion so a simple R/C low pass filter may be sufficient). I know of no PIC with on board D/A to give him "one pin" output. Robert -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist