Proteus problem

Discussion in 'The Projects Forum' started by skorpion45, Apr 27, 2015.

  1. skorpion45

    Thread Starter New Member

    Apr 1, 2015
    9
    0
    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
     
Loading...