The example in the Pic Basic manual is about as easy as it gets.
Just make sure the ADC and comparators are shut down if you pic has them..