You didn't give the current requirements for the negative supply. Most charge pump inverters have a max current of 100mA or less.
Here's how I'd do it to keep it simple. To generate the negative voltage use a standard charge pump, like the cat660, here:
The part standard is called the 7660. Other parts in this class of chips includes the OnSemi 7662 and the Linear Tech LTC1044. Each takes a positive voltage (+9V in your case) and inverts it.
Then you can use an open ended opamp as your switch. Connect the +9V and -9V supplies to V+ and V- of the opamp. In its most basic form an opamp will drive the output so that the two input voltages match. Typically feedback is used to accomplish this where the output is fed back into one of the inputs. However in an open ended setup, the output will try to drive the voltage towards the rails. So the basic rule is that the output will drive positive as long as the + input is greater than the - input, and vice versa. So here's how you can set up it. Use a voltage divider to get a 2.5V to the
- input of the opamp. This can be as simple as two equal 100k resistors connected between +5 and GND. The connect the microcontroller output to the
- input of the omp amp. When the uC output is +5 the + input is above the
- input so the ompamp output will swing to +9V. OTOH when the microcontroller output is 0V the + input is below the - input and the opamp output will drive to -9V. Problem solved.
Be sure to get a rail to rail opamp for the job.
So two ICs, two resistors, and two caps. Not two ;-) much.
BAJ