I've built a triple variable power supply with two 0...+21V outputs and one 0...-21V outputs. I want to finish it with a dedicated triple voltmeter, using an 16f877 and a 2x40 character LCD. I'll use a voltage divider to get each supply into the + or -5V range and then multiply in software to get the actual value to display. Just one problem - how to change the minus voltage to positive voltage, so that I can measure all three sources using a single 16f877? (Each 16f877 ADC input must be 0...+5V.) I have a 7660 which converts positive voltage to negative nicely. The minus output follows the positive input to within .01V. But I couldn't find any part to do the reverse job (minus to positive). If I were to reverse the inputs (connect the power supply Ground to the 7660 V+ and the power supply V- to the 7660 Ground), then the minus voltage coming out would be relative to the -V input, not the Ground. (For example -4V in, results in -8V out with respect to the system ground which is also the 16f877 Ground. I wish I could run it "backwards", but applying minus voltage to the 7660 V- output did not produce positive voltage at the 7660 V+ input ;) I think there must be a simple solution, but I'm just a beginner. Any ideas would be appreciated. 0...21V --- | \ / \ (0...5V) |------------------------ / | \ AN0 | -------- Gnd ------------------------------| 16f877 |-- +5V | -------- \ AN2 / | |--------------------- ????? (magical - to + voltage inverter) / (0...-5V) (using 7660 or ?) / \ | 0...-21V -- -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist