Has anyone seen published a circuit and PIC program that achieves something similar to what is described below? There need to be two 0-9 BCD rotary switches, one representing 1 Hz per detent and the other 0.1Hz. These cause a PIC micro (8 pin?) to output a 50% duty cycle squarewave at the selected frequency. For example, a 6 and 3 would result in 6.3Hz. The PIC's output is then fed to a 16 bit shift register with resistors weighted according to sine function, or any other waveform required. This output is to drive a 500R solenoid via a rail-to-rail (single supply) OP amp. Power consumption is a key factor, as the circuit will run from a 9V battery. I am an electronics technician, but new to development, so would need to be guided by an existing design. Any help or pointers would be greatly appreciated. Peter Nielsen SCU PS: Sorry my post was not properly tagged last time. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics