Andre That is the correct formula. Another way is to determine the current you want and calculate values from this. ie. Let Vs = 14V, Let i = 1mA, Let Vref = 2.57 R2 = Vref/i = 2.57/1mA = 2570 R1 = (Vs - Vref)/1mA = 11430 (use closest values R1 = 12k, R2 = 2k7 , Vref' = 2.571 Regards David Huisman -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.