*
#include <p18f1330.h>
#pragma config WDT = OFF
#pragma config MCLRE = ON, DEBUG = OFF
#pragma config CP0 = OFF, CP1 = OFF, WRTC = OFF, WRTD = OFF, EBTR0 =* OFF, EBTR1 = OFF, EBTRB = OFF
#pragma config OSC=INTIO2 // Internal oscillator, port function on RA6 and RA7** IO1 has FOSC on RA6
#pragma config PWRT = OFF
void pwm1(void);
void pwm2(void);
void pwm4(void);
void main (void)
{
OSCCONbits.IRCF2 = 1;
OSCCONbits.IRCF1 = 1;
OSCCONbits.IRCF0 = 0;
*PTCON0 = 0xF;
*PTCON1 = 0x0;********// the entire register set to 0
PWMCON0 = 0x28;
*PWMCON1 = 0x0;
*FLTCONFIG = 0x00;*
PTMRL = 0;* //PWM start at 0;
*PTMRH = 0;
*PTPERL = 1;* //PWM time base period set to 10 bits
*PTPERH = 0xFF;* //the higher bits will not be used here.
*PDC0H = 10;****** //set period
*PDC0L= 0xFF;
**PTCON1bits.PTEN* = 1;* // Enable PWM Timerbase !***
for(;;){ //infinite loop
} //end for
}