You can control the resistance by using a digital pot. You just send the values of the resistance you want via SPI and then the digital pot will adjust to it. Microchip, among others, makes a variety of them. Their part number (Microchip's) starts with MCP41 /MCP42-then the value of the pot. Application note AN746 from Microchip's website shows you how to interface a PIC16F876 to their digital pots. I am sure you can figure out how to port it over to the 16F628. Hope this helps. AN746 http://www.microchip.com/download/appnote/analog/mcp4xxxx/00746a.pdf \manu _______________________ Manu Nair mnair@email.sae.org -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Jai Dhar Sent: November 1, 2002 9:54 PM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]: Controlling resistance Hello, I am looking to make a simple linear psu using lm317/337's adjustable regulators. Basically, they use a pot from 0 -> 5k to adjust the Vout. I was wondering if there is a way I can control a resistance using a 16f628, so I can incorporate a sort of digital feel to my psu. Thank you for your time, Jai ---------------------------------------- This mail sent through www.mywaterloo.ca -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu