Arduino EEPROM Programmer

Hey All,
I Need help with a little eeprom programmer i am building with the arduino. I’m having trouble building a circuit which will allow me to apply either 0v, 5v, and 12v to one of the address pins on the eeprom. From the datasheet - “In order to activate the Erase mode for SST27SF020, the 11.4-12.6V is applied to VPP and A9 pins”. I have the dual 12v, 5v supply already but am unsure how to allow me to programmatically switch a single pin from 0v, 5v, 12v. If you have any ideas on how to implement that ability please let me know.
What i had considered was wiring up two transistors to be used as switches connect to a very simple 2bit dac which should give me the ability to output 0v, 3v, 6v, 12v? With a slight adjustment for the 5.5v max voltage on the a9 pin.
I mocked up a quick circuit(images are attached) and it does appear, in the simulator, to work… but i am a software programmer not a hardware guy so i may be totally off with my solution. In the schematic the switches are intended to be replaced by the arduino digital pins.
If you have a better solution that would be great as well. I am just looking to keep the components very basic so if it can be done with general purpose transistors/resistors id like to go that route rather than use a special purpose ic.

Thanks in advance.

Low.png

high.png

programming.png

Your solutions are well-intentioned but the use of voltage dividers is only good when there is no (or very little) current drawn from them. I don't know exactly how much current you will draw at 5V and 12V but anything more than just a few microamps will throw your voltages off. To see the effect, add a "load" resistor from your measurement point to ground. Let's assume a load current of 1mA at 12V: add a 12k resistor and see what happens.

I'd suggest using two load switches, using a circuit like this:

http://ruggedcircuits.com/html/circuit__11.html

One load switch for 5V, one for 12V. In addition, you will want to use a diode as in your own circuit to prevent "backfeeding" 12V into the 5V supply.

-- The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Thank you, I do see the issue you are describing when I add various load resistances. I think the datasheet is telling me that the chip will only draw a maximum of 200 ?A when erasing so the effect may not be as noticable -- "IH - Supervoltage Current for A9 - 200 ?A".