T16

งานที่ 16


void main()
{
     unsigned int analog;
     TRISA=0xFF;
     TRISC=0;
     T2CON=0x02;
     CCP1CON=0x0C;
     PR2=0xFF;
     T2CON.TMR2ON=1;
     while(1)
     {
            analog=Adc_Read(3);
            analog=analog/4;
            CCPR1L=analog;
     }
}

ความคิดเห็น

บทความที่ได้รับความนิยม