Thanks for the reply! Sorry, I forgot to mention that it needs to be fairly linear, because the 0-5V is going into an 8-bit ADC. The signal I need to be able to discriminate among approximately -12/-6/-3/0/+3/+6/+12 with a 1KHz signal.A N mosfet with the source connected to the gnd and a resistor from the drain to the +5v.
Connect the input in the gate, when +12 the mosfet will turn on and the drain will output 0, when the input is -12 the mosfet will turn off and the drain resistor will work as a pullup and the output will be 5v.
You never mentioned the rate of the pulses, if the speed needs to be high then you may also need some mosfet driver for fast switching.
I hooked it up exactly that way, except that I used 10K/50K. What's a good rule of thumb for picking the resistor values for these kinds of op amp circuits? And can you tell me what software you used to create the diagram? Thanks again.