I have a battery operated circuit where i need to convert TTL 0-3V to -4V low and +4V high. I was going to use a MAX232, however I'm unsure of the voltage supplies I wire to the MAX to output these voltages. How do I get -4V and +4V on the Vs- and Vs+ terminals? (pins 2 and 6) My circuit power supply is simply a +12V battery so I can't just wire it to the voltage rails.
You only have to connect power to Vcc - the chip generates the other voltages. Refer to the datasheet for the correct capacitor values and connecitons.
The MAX220–MAX249 have two internal charge-pumps
that convert +5V to ±10V (unloaded) for RS-232 driver
operation. The first converter uses capacitor C1 to double
the +5V input to +10V on C3 at the V+ output. The
second converter uses capacitor C2 to invert +10V to
-10V on C4 at the V- output.
There's a reason that manufacturers put the time and money into creating datasheets. You really should try reading them - it will help you understand how the device works.
the matter isn't about voltage higher than the supply voltage, yes the IC can generate higher voltage than the supply, the output will be 12 and -12 volts use either LM317 voltage regulator to get 4 volts or potentiometer to get 4 & -4 volts.
but take care the maximum output current is very low (nearly 30mA), refer to the datasheet to make sure.
Good luck