// include the XC header file to define all register and bit names
#include <xc.h>

//  Select Fosc as the clock, with prescaler of 10 
PTGCLK = 1;        // clock source set to Fosc
PTGDIC = 0x09;      // set prescaler to 10

// Select FP as clock source with NO prescaler
PTGCLCK = 0 ;       // clock source set to Fp
PGTDIV = 0 ;        // set prescaler to 1