Proteus problem

Thread Starter

skorpion45

Joined Apr 1, 2015
9
H I`ve got simple code and it doesnt work with proteus, can someone hepl me, thx
// dims RC1 in regular intervals using PWM



void main()
{
TRISC=0x00;
PORTC=0;
PR2=0xff;
T2CON=0X06; // Pre-Scale=16 and TMR2ON=1 start Timer2
CCP1CON=0X0c; //PWM mode selected. LOW bits are 00
CCPR1L=0;
while (1)
{
Delay_ms(20);
CCPR1L=CCPR1L+1;
}
}
compailer mikroC
 
Top