Page 768 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 768

Ⅳ.  CodeVision  Source  Code




                   {
                   PORTB.6 = 1;
                      delay_us(1500);
                   PORTB.6 = 0;
                      delay_us(18500);
                   }
              }
              void  open()                      //서보모터를  제어하여  차단기를  여는  함수
              {
                   int k;
                      for(k=0;k<25;k++)
                   {
                   PORTB.6 = 1;
                      delay_us(2400);
                   PORTB.6 = 0;
                      delay_us(17600);
                   }
              }


              void  qrd1()                      //1st  floor qrd sensor
              {
                   while(PINB.0  != 0);
              }


              void  qrd2()                      //2nd  left  blue  floor qrd sensor
              {
                   while(PINB.1  != 0);
              }


              void  qrd2_1()                     //2nd right white  floor qrd sensor
              {
                   while(PINB.4  != 0);
              }


              void  microsw()                   //3rd floor micro switch
              {
                   while(PINB.5  != 0);
              }


              void  B1_microsw()               //Blue  1층 Micro Swtich  제어
              {


                                                                                               정보통신기기과
                                                         -  761  -
   763   764   765   766   767   768   769   770   771   772   773