I need some code to program a TI MSP430F2274 microprocessor to take Analog input from a potentiometer (5KOhm preferably) and convert it to digital stimulus to control a digital rheostat/potentiometer (5KOhm) connected to it. Basically, I need the digital potentiometer to reflect any changes from the analog potentiometer. I have already written some code to that effect but its taking some time to debug so you can start writing your own code if you want. I need the code asap, hopefully within the next day.
I will need to relay the information wirelessly but that is secondary to the actual project work desired.