F16

F16



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;
     }
}

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

IC 13

DIY Arduino Traffic Light Pedestrian Light Push Button Control (https://thecustomizewindows.com/2016/06/diy-arduino-traffic-light-pae-push-button/)

Arduino Servo Motors (https://learn.adafruit.com/adafruit-arduino-lesson-14-servo-motors/arduino-code-for-sweep)