> Ok, I see that, using a regulator such a lm317 I can have a constant > current, changing the resistance connected to it I can change the current > value; and now the question arise: who to attach the outputs pins of the > pic to change that resistance value? You can use two pins to a 2 bit D/A made from resistors to get the four voltage levels, then use these to drive a current source. You could also use a single PIC output pin with PWM. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.