Hi,
OSCCON = %01100000 ' Sets the internal oscillator register to 4 MHz
Nope, the two most significant bits are not used so that can't be right. OSCCON = %00010000 would be 4MHz IF the PLL is enabled (which you do with the CONFIG bits). If the PLL is not enabled you'd get 125kHz.

ADCON1=%00000111 ' All Ports Digital
Nope, ADCON1 basically controls the clock to the ADC and from where it gets its references. To set which pins are analog vs digital you use ANSELA, ANSELB, ANSELE

OPTION_REG.7 = 0 ' Enable Port B pull-ups
Yes and no. This "turns on" the pullups but you also need to select WHICH of the 8 pullups to be enabled - you do that thru the WPUB register.

TRISB = %11111111 ' Port B input
TRISA = %00000000 ' Port A output
TRISC = %11111100 ' Port C inputs C.2 to C.7 inputs Port C.0 and C.1 outputs
Yep, that seems right.

Always use the datasheet for the correct device. Just because it's done one way with one device for which you may see some code on the 'net doesn't mean it's the same for another device - that would just be TOO easy ;-)

As for "how to read the datasheet" I don'r have any good advice really. It's just a matter of reading thru the section pertaining to the specific peripheral you're using. Oh, one tip though, at the end of each section there's a list of registers which, in one way or another, relates to the specific peripheral. If something doesn't work the way you expect go thru that list and make sure you haven't missed something.

/Henrik.