บทความ

กำลังแสดงโพสต์จาก มีนาคม, 2019

มินิโปรเจค

รูปภาพ
แสดงข้อความบน LCD อุปกรณ์ 1. LCD  2. สวิตซ์ 3. PIC16F877 4. R 10k  5 ตัว 5. VR 50k  6. Crystal 4M 7. Capacitor 22p  2ตัว CODE char *text = " HELLO Teacher"; char *text1 = "How are you?"; void main() {   TRISC = 0xFF;   TRISB = 0;   PORTC=0;   Lcd_Init(&PORTB);         // Initialize LCD connected to PORTB   Lcd_Cmd(Lcd_CLEAR);       // Clear display   Lcd_Cmd(Lcd_CURSOR_OFF);  // Turn cursor off   while(1)   {   RETURN:if(PORTC.F1==0)   {                  Lcd_Out(1, 2,             text);                  while(PORTC.F1==0);   }     if(PORTC.F2==0)              {                  Lcd_Out(2, 5,             text1);                  while(PORTC.F2==0);              }     if(PORTC.F3==0)              {               while(1)                       {                   Delay_ms(100);                  Lcd_Out(1, 2,             text);                  Lcd_Out(2, 5,             text1);                      L