You need to set internal oscillator because you use porta.6 and porta.7 as I/O.
See page 17 on datasheet of pic18f1230.