Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top