On Thu, 11 Sep 2003 08:34:20 +1000, you wrote: >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. At these low frequencies, you could probably do away with the shiftreg = and output a PWM or pulse-density modulated signal from the PIC, with a simple filter to get = the analogue output.=20 You'll need more than 8 pins to read the switches - (OK it may be = possible on a '675 using the ADC but will be a bit of a pain) - an 18 pin device will be a lot easier! -- 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