As this is a little difficult part in writing a program for the 18 series, here is a link for a Microchip pdf to help in the Config settings.

http://ww1.microchip.com/downloads/e...ngs_51537f.pdf

Ioannis