There are application notes on Microchip's web site about capacitive sensing. If you do it on a chip that doesn't have special support, the trick is to use a comparator input and make it into a simple oscillator. Your software reads the comparator output and copies it to one of the port pins, you connect that back to the input of the comparator through a resistor and connect a small capacitor between the input and ground. It will oscillate at a frequency decided by the resistor and capacitor value and you connect insulated probes across it to sense additional capacitance caused by the dielectric between them, ie. the water. You use one of the internal timers to measure the frequency. It doesn't give you a direct measurement of liquid depth but it gives a value proportional to the probe immersion distance.
To bit-bang a serial stream is very easy and you can use any pins, this is the principle:
if you are only sending -
1. Set up a delay routine which is exactly one bit length long (1/baud rate).
2. put the byte you want to send in a register.
3. make the output pin go low for one bit period (make it low, then wait using your delay routine) this is the start bit
4. shift your data one bit to the right so the LSB goes into the carry flag, depending on if 'C' is set or not, make the output pin low or high then wait for one bit period again.
5. repeat step 4 until all the bits have been shifted out
6. make the output high and wait one bit period to make the stop bit.
if you want to receive -
1. set up two delay routines (or one with two selectable delay periods), one should be one bit long as with the receive delay, the other 1.5 bit periods long.
2. look for the input going low, this is the incoming start bit.
3. wait for 1.5 bit periods, at the end of the delay you should be past the start bit and half way through the first data bit.
4. read the bit in and rotate it left into your receive register, then wait one bit period.
5. repeat step 4 until all the bits are received.
6. wait for one bit length and optionally check the input has gone high, this will ensure the final data bit has finished and you are at least some way into the stop bit or idle state.
For true RS485 you will also need a direction control pin.
Brian.