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

ความคิดเห็น

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

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)