Build Failed

Status
Not open for further replies.

twiart

New Member
MPLAB failed to build this piece of PWM code.It says

M:\12 CCP PWM\12 CCP PWM.c:70:Error [1105] symbol 'CCPRIL' has not been defined
M:\12 CCP PWM\12 CCP PWM.c:70:Error [1101] lvalue required


What should i do to the CCPRIL?

Code:
#pragma code    								// declare executable instructions

void main (void)
{


	// set internal oscillator to 1MHz	
 	OSCCON = 0b10110110;          		  // IRCFx = 101
 	OSCTUNEbits.PLLEN = 0;                //PLL disabled

	TRISDbits.TRISD7 = 0;

 	T2CON  = 0b00000101;					//timer2 on
	PR2    = 240;
	CCPR1L = 0x78;
	CCP1CON= 0b01001100;
//	Delay10TCYx(200);

while(1);
}
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…