I would go for a 12 bits shift register, parallel output. Probably you should use two 8 bits shift register. Use just one wire from the PIC to the external circuit. Once this wire goes pulse down the shift register shift a zero bit ahead. The rotary switch selects one of the twelve shift register outputs. The selected output by the rotary switch has a diode (ored) katode to the rotary common. The diode anode goes "ored" to the PIC pin and the shift register clock input. Before your PIC pulses down the pin, it reads it to see if it is down or up. If the pin is up, the zero bit of the shift register in not the one selected at the rotaty. If the pin is down, then it is the selected, so you pulsed the pin the same number of the position of the rotary switch. To end the cycle, pulse the rest of the 12 or 13 shifts, so the last one resets the shift register, in a complete round cycle. Probably it should be cheapper to use another PIC unit at the rotary switch side, doing the shift register job... if it would be expensive, go to a cheapper AT89C2051 for less than $3, flash memory inside and so on... then it could just keep sending a train of pulses, in the count equivalent of the rotary position... huh? Just don't be afraid to use more than one microcontroller. People usually are. Wagner Lipnharski.