F6

F6




void main()
{
     TRISB=0xFF;
     TRISC=0;
     Lcd_Init(&PORTC);
     Lcd_Cmd(LCD_CURSOR_OFF);
     Lcd_Cmd(LCD_CLEAR);
     Lcd_Out(1,2,"                SMART LEARNING");
     Lcd_Out(2,1,"                ADVANCE PIC BY C");
     while(1)
     {
             RETURN:if(PORTB.F0==0)
             {
                      Lcd_Cmd(LCD_SHIFT_RIGHT);
                      while(PORTB.F0==0);
             }
             if(PORTB.F1==0)
             {
                      Lcd_Cmd(LCD_SHIFT_LEFT);
                      while(PORTB.F1==0);
             }
             if(PORTB.F2==0)
             {
                      while(1)
                      {
                              Lcd_Cmd(LCD_SHIFT_RIGHT);
                              delay_ms(100);
                              if(PORTB.F0==0||PORTB.F1==0)goto RETURN;
                      }
             }
      }
}

ความคิดเห็น

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

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

ไมโครคอนเทอร์เลอร์(อ้างอิงhttp://www.techmonkeybusiness.com/ps2-controller-sketch-for-escs-and-stuff.html)

Arduino Bluetooth Control Smart Home (http://androidcontrol.blogspot.com/2015/05/arduino-bluetooth-control-smart-home.html?m=1)