Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

mourad 2eme

433 views

Published on

  • Be the first to comment

mourad 2eme

  1. 1. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬     B0B1B5B7                                ‫ﺍﻟﺘﺠﺮﺑﺔ‬ 7805 +٥‫ﻓﻮﻟﺖ‬VDD ‫ﻓﻮﻟﺖ‬ ‫ﺻﻔﺮ‬VSS ‫ﻣﻘﺎوﻣﺔ‬٤٢٠‫أوم‬ ‫ﻣﻘﺎوﻣﺔ‬١٠‫ﻛﯿﻠﻮ‬ ‫ﻣﻜﺜﻒ‬٢٢‫ﺑﯿﻜﻮ‬ ‫ﺑﻄﺎرﯾﺔ‬٩‫ﻓﻮﻟﺖ‬ VDD VSS VSS
  2. 2. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬                             ‫وﻧﻜﺘﺒﮫ‬ ‫ﻟﻠﻤﺸﺮوع‬ ‫اﺳﻢ‬ ‫ﻧﺨﺘﺎر‬ ‫ھﻨﺎ‬ ‫اﻟﻤﺸﺮوع‬ ‫ﻣﺴﺎر‬ ‫ﻧﻜﺘﺐ‬ ‫ھﻨﺎ‬ ‫ﺳﯿﺤﻔﻆ‬ ‫اﻟﺬي‬ ‫اﻟﻤﻜﺎن‬ ‫اي‬ ‫ﻓﯿﮫ‬ ‫اﻟﺒﻚ‬ ‫ﻧﻮع‬ ‫ﻧﺨﺘﺎر‬ ‫ﻓﻲ‬ ‫اﻟﻤﺴﺘﺨﺪم‬ ‫اﻟﻤﺸﺮوع‬ ‫اﻟﻤﺆﻗﺖ‬ ‫ﺗﺮدد‬ ‫ﻧﻜﺘﺐ‬ ‫ھﻨﺎ‬ ‫ھﺬا‬ ‫ﻣﺸﺮوﻋﻨﺎ‬ ‫ﻓﻲ‬ ‫اﻟﻤﺴﺘﺨﺪم‬ ‫اﻟﻤﻮﺟﻮدة‬ ‫اﻟﻘﯿﻢ‬ ‫ﺑﻨﻔﺲ‬ ‫اﻛﺘﺒﮫ‬ ‫ھﻨﺎ‬1.04 ‫اﻻﺧﺘﯿﺎر‬ ‫ھﺬا‬ ‫اﺧﺘﺮ‬ ‫ﻟﻨﻮع‬ ‫ﯾﺸﯿﺮ‬ ‫وھﻮ‬ ‫اﻟﻤﺆﻗﺖ‬
  3. 3. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬                                   Ctrl+F9   ‫ﻣﺮاﺟﻌﺔ‬:‫ﯾﺴﻤﻰ‬ ‫ﻣﺎ‬ ‫أو‬ ‫اﻷواﻣﺮ‬ ‫ھﻲ‬ ‫ھﺬه‬‫ﺑﺎﻟﻜﻮد‬ ‫اﻟﺒﺮﻧﺎﻣﺞ‬ ‫ﻧﺴﻤﯿﮭﺎ‬ ‫اﻷواﻣﺮ‬ ‫وﻣﺠﻤﻮﻋﺔ‬ void main() { TRISB=0B00000000; PORTB=0B10100011; }
  4. 4. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬    TRISB=0B00000000;B0B7  PORTB=0B10100011;B0B1B5B7 B2B3B4B6       1 0 1 0 0 0 1 1 PORTB B0B1B2B3B4B5B6B7 ‫ﺑـ‬‫اﻟﻤﻮﺻﻞ‬‫اﻟﻠﯿﺪ‬B0‫ﯾﻀﻲء‬‫ﺳﻮف‬ ‫ﺑـ‬‫اﻟﻤﻮﺻﻞ‬‫اﻟﻠﯿﺪ‬B1‫ﯾﻀﻲء‬‫ﺳﻮف‬ ‫ﺑـ‬‫اﻟﻤﻮﺻﻞ‬‫اﻟﻠﯿﺪ‬B5‫ﯾﻀﻲء‬‫ﺳﻮف‬ ‫ﺑـ‬‫اﻟﻤﻮﺻﻞ‬‫اﻟﻠﯿﺪ‬B7‫ﯾﻀﻲء‬‫ﺳﻮف‬ ‫ﺑـ‬‫اﻟﻤﻮﺻﻞ‬‫اﻟﻠﯿﺪ‬B2‫ﯾﻀﻲء‬‫ﻟﻦ‬ ‫ﺑـ‬‫اﻟﻤﻮﺻﻞ‬‫اﻟﻠﯿﺪ‬B3‫ﯾﻀﻲء‬‫ﻟﻦ‬ ‫ﺑـ‬‫اﻟﻤﻮﺻﻞ‬‫اﻟﻠﯿﺪ‬B4‫ﯾﻀﻲء‬‫ﻟﻦ‬ ‫ﺑـ‬‫اﻟﻤﻮﺻﻞ‬‫اﻟﻠﯿﺪ‬B6‫ﯾﻀﻲء‬‫ﻟﻦ‬
  5. 5. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬  TRISB=0B00000000;Bits TRISB=0;  PORTB=0B10100011;  PORTB=0XA3;0xa3 10100011                     TRISB=0B00000000; ‫ھﻜﺬا‬ ‫ﻛﺘﺎﺑﺘﮭﺎ‬ ‫ﯾﻤﻜﻦ‬ TRISB=0; PORTB=0B10100011; ‫ھﻜﺬا‬ ‫ﻛﺘﺎﺑﺘﮭﺎ‬ ‫ﯾﻤﻜﻦ‬ PORTB=0XA3; void main() { TRISB=0; PORTB=0XA3; }
  6. 6. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬ Mikroc decimalbinary hexadecimal    10100011  QConvertor    binary              ‫ھﻨﺎ‬ ‫اﺿﻐﻂ‬
  7. 7. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬      B0B7                              7805 +٥‫ﻓﻮﻟﺖ‬VDD ‫ﻓﻮﻟﺖ‬ ‫ﺻﻔﺮ‬VSS ‫ﻣﻘﺎوﻣﺔ‬٤٢٠‫أوم‬ ‫ﻣﻘﺎوﻣﺔ‬١٠‫ﻛﯿﻠﻮ‬ ‫ﻣﻜﺜﻒ‬٢٢‫ﺑﯿﻜﻮ‬ ‫ﺑﻄﺎرﯾﺔ‬٩‫ﻓﻮﻟﺖ‬ VDD VSS VSS ‫ﺍﻟﺘﺠﺮﺑﺔ‬
  8. 8. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬  PORTBB0B7 TRISB  TRISB=0;   PORTB=0B11111111;PORTB=0XFF; PORTB=0;         Void main() { TRISB=0; PORTB=0XFF; PORTB=0; } PORTB=0;PORTB=0XFF;  ‫ﺛﻢ‬ ‫ﯾﻠﯿﮫ‬ ‫اﻟﺬي‬ ‫ﺛﻢ‬ ‫اﻷﻣﺮ‬ ‫ﺳﯿﻨﻔﺬ‬ ‫اﻟﺒﻚ‬ ‫ﻣﻨﺘﮭﻰ‬ ‫ﻓﻲ‬ ‫وھﻜﺬا‬ ‫ﯾﻠﯿﮫ‬ ‫اﻟﺬي‬ ‫اﻟﺴﺮﻋﺔ‬..
  9. 9. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬       Delay_ms(500);   Delay_ms(250);   Void main() { TRISB=0; PORTB=0xFF; delay_ms(1000); PORTB=0; } delay_ms(500);       
  10. 10. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬    LOOP: ………………….. ………………….. ………………….. goto LOOP;   void main() { TRISB=0;  Loop: PORTB=0XFF; delay_ms(1000); PORTB=0; Delay_ms(1000); goto loop;  }    ‫اﻟﺬي‬ ‫اﻟﻜﻮد‬ ‫ﻧﻜﺘﺐ‬ ‫اﻟﻤﻨﻄﻘﺔ‬ ‫ھﺬه‬ ‫ﻓﻲ‬ ‫ﺑﺈﺳﺘﻤﺮار‬ ‫ﯾﺘﻜﺮر‬ ‫أن‬ ‫ﻧﺮﯾﺪه‬. ‫أﺧﺮى‬ ‫ﻣﺮة‬ ‫اﻟﺒﻚ‬ ‫إﻟﯿﮫ‬ ‫ﺳﯿﺮﺟﻊ‬ ‫اﻟﺬي‬ ‫اﻟﻌﻨﻮان‬ ‫ھﻮ‬ ‫ھﺬا‬ ‫ﻓﻲ‬ ‫اﻟﺮﺟﻮل‬ ‫ﺟﻤﯿﻞ‬ ‫ﺳﯿﻮﻇﻒ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬PortB‫ﻛﺨﺮج‬ ‫ﺗﻀﻲء‬ ‫اﻟﻠﯿﺪات‬ ‫ﺟﻤﯿﻊ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬ ‫اﻟﻠﯿﺪات‬ ‫ﺟﻤﯿﻊ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬‫ﺗﻄﻔﺊ‬ ‫ﯾﻠﯿﮫ‬ ‫اﻟﺬي‬ ‫اﻷﻣﺮ‬ ‫ﯾﻨﻔﺬ‬ ‫ﺛﻢ‬ ‫ﺛﺎﻧﯿﺔ‬ ‫ﻟﻤﺪة‬ ‫ﯾﻨﺘﻈﺮ‬ ‫اﻟﺒﻚ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬ ‫ﯾﻠﯿﮫ‬ ‫اﻟﺬي‬ ‫اﻷﻣﺮ‬ ‫ﯾﻨﻔﺬ‬ ‫ﺛﻢ‬ ‫ﺛﺎﻧﯿﺔ‬ ‫ﻟﻤﺪة‬ ‫ﯾﻨﺘﻈﺮ‬ ‫اﻟﺒﻚ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬ ‫اﻟﺬي‬ ‫اﻟﻌﻨﻮان‬ ‫ﺑﻌﺪ‬ ‫اﻟﺘﻲ‬ ‫اﻷواﻣﺮ‬ ‫ﻟﯿﻨﻔﺬ‬ ‫ﯾﺬھﺐ‬ ‫اﻟﺒﻚ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬ ‫اﺳﻤﮫ‬loop ‫اﻟﻌﻨﻮان‬ ‫إﻟﻰ‬ ‫اذھﺐ‬ ‫اﻷﻣﺮ‬ ‫ھﺬ‬ ‫ﻣﻌﻨﻰ‬loop‫ﺑﻌﺪه‬ ‫اﻟﺘﻲ‬ ‫اﻷواﻣﺮ‬ ‫ﺗﻨﻔﯿﺬ‬ ‫واﺑﺪأ‬
  11. 11. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬ PORTB=0;    Ahmad   ahmad:  ………………….. ………………….. ………………….. goto ahmad; Syntax   enter   void main()  { TRISB=0;  PORTB=0XFF;}  ; enter  void main()  { TRISB=0;PORTB=0XFF;}    ‫اﻟﻤﻨﻄﻘﺔ‬ ‫ھﺬه‬ ‫ﻓﻲ‬‫اﻟﺬي‬ ‫اﻟﻜﻮد‬ ‫ﻧﻜﺘﺐ‬ ‫ﺑﺈﺳﺘﻤﺮار‬ ‫ﯾﺘﻜﺮر‬ ‫أن‬ ‫ﻧﺮﯾﺪه‬.
  12. 12. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬   void main() { TRISB=0;PORTB=0XFF;}      void main() { TRISB=0; Loop: PORTB=0XFF;delay_ms(1000);PORTB=0;  Delay_ms(1000);Goto loop;}    void main(){TRISB=0; Loop: PORTB=0XFF;delay_ms(1000);PORTB=0;Delay_ms(1000);Goto loop;}     
  13. 13. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬            proteus                MikroC       ‫ﺍﻟﺘﺠﺮﺑﺔ‬
  14. 14. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬ void main() {TRISB=0; PORTB=0; loop: PORTB=0B00000001; delay_ms(500); // L0 ON PORTB=0B00000011; delay_ms(500); //L0,L1 ON PORTB=0B00000111; delay_ms(500); //L0,L1,L2 ON PORTB=0B00001111; delay_ms(500); //L0,L1,L2,L3 ON PORTB=0B00011111; delay_ms(500); //L0,L1,L2,L3,L4 ON PORTB=0B00111111; delay_ms(500); //L0,L1,L2,L3,L4,L5 ON PORTB=0B01111111; delay_ms(500); //L0,L1,L2,L3,L4,L5,L6 ON PORTB=0B11111111; delay_ms(500); // L0,L1,L2,L3,L4,L5,L6,L7 ON PORTB=0B00000000; delay_ms(500); // ALL LEDs OFF PORTB=0B00011000; delay_ms(500); // L3,L4 ON PORTB=0B00111100; delay_ms(500); //L2-L5 ON PORTB=0B01111110; delay_ms(500); //L1-LS ON PORTB=0B11111111; delay_ms(500); // ALL LEDs ON PORTB=0B00000000; delay_ms(500); // ALL LEDs OFF PORTB=0B11111111; delay_ms(500); // ALL LEDs ON PORTB=0B00000000; delay_ms(500); // ALL LEDs OFF PORTB=0B11111111; delay_ms(500); // ALL LEDs ON PORTB=0B00000000; delay_ms(500); // ALL LEDs OFF goto loop;}
  15. 15. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬ loop B0L0 //L0 ONB0 // B1L1B2 L2       loop:      PORTB=0B00000001; delay_ms(500); PORTB=0B00000011; delay_ms(500); PORTB=0B00000111; delay_ms(500); PORTB=0B00001111; delay_ms(500); PORTB=0B00011111; delay_ms(500); PORTB=0B00111111; delay_ms(500); PORTB=0B01111111; delay_ms(500); PORTB=0B11111111; delay_ms(500); PORTB=0B00000000; delay_ms(500);
  16. 16. ‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬   PORTB=0B00011000; delay_ms(500); PORTB=0B00111100; delay_ms(500); PORTB=0B01111110; delay_ms(500); PORTB=0B11111111; delay_ms(500); PORTB=0B00000000; delay_ms(500);   PORTB=0B11111111; delay_ms(500); PORTB=0B00000000; delay_ms(500); PORTB=0B11111111; delay_ms(500); PORTB=0B00000000; delay_ms(500);     /* */  /* program : led flasher Programmed by : Ahmad samir fayed */    

×