SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
 
B0B1B5B7
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
‫ﺍﻟﺘﺠﺮﺑﺔ‬
7805
+٥‫ﻓﻮﻟﺖ‬VDD
‫ﻓﻮﻟﺖ‬ ‫ﺻﻔﺮ‬VSS
‫ﻣﻘﺎوﻣﺔ‬٤٢٠‫أوم‬
‫ﻣﻘﺎوﻣﺔ‬١٠‫ﻛﯿﻠﻮ‬
‫ﻣﻜﺜﻒ‬٢٢‫ﺑﯿﻜﻮ‬
‫ﺑﻄﺎرﯾﺔ‬٩‫ﻓﻮﻟﺖ‬
VDD
VSS
VSS
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

 
  
 
 
 
 
 
 
 
 
 
 
 
‫وﻧﻜﺘﺒﮫ‬ ‫ﻟﻠﻤﺸﺮوع‬ ‫اﺳﻢ‬ ‫ﻧﺨﺘﺎر‬
‫ھﻨﺎ‬
‫اﻟﻤﺸﺮوع‬ ‫ﻣﺴﺎر‬ ‫ﻧﻜﺘﺐ‬ ‫ھﻨﺎ‬
‫ﺳﯿﺤﻔﻆ‬ ‫اﻟﺬي‬ ‫اﻟﻤﻜﺎن‬ ‫اي‬
‫ﻓﯿﮫ‬
‫اﻟﺒﻚ‬ ‫ﻧﻮع‬ ‫ﻧﺨﺘﺎر‬
‫ﻓﻲ‬ ‫اﻟﻤﺴﺘﺨﺪم‬
‫اﻟﻤﺸﺮوع‬
‫اﻟﻤﺆﻗﺖ‬ ‫ﺗﺮدد‬ ‫ﻧﻜﺘﺐ‬ ‫ھﻨﺎ‬
‫ھﺬا‬ ‫ﻣﺸﺮوﻋﻨﺎ‬ ‫ﻓﻲ‬ ‫اﻟﻤﺴﺘﺨﺪم‬
‫اﻟﻤﻮﺟﻮدة‬ ‫اﻟﻘﯿﻢ‬ ‫ﺑﻨﻔﺲ‬ ‫اﻛﺘﺒﮫ‬
‫ھﻨﺎ‬1.04
‫اﻻﺧﺘﯿﺎر‬ ‫ھﺬا‬ ‫اﺧﺘﺮ‬
‫ﻟﻨﻮع‬ ‫ﯾﺸﯿﺮ‬ ‫وھﻮ‬
‫اﻟﻤﺆﻗﺖ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Ctrl+F9
 
‫ﻣﺮاﺟﻌﺔ‬:‫ﯾﺴﻤﻰ‬ ‫ﻣﺎ‬ ‫أو‬ ‫اﻷواﻣﺮ‬ ‫ھﻲ‬ ‫ھﺬه‬‫ﺑﺎﻟﻜﻮد‬
‫اﻟﺒﺮﻧﺎﻣﺞ‬ ‫ﻧﺴﻤﯿﮭﺎ‬ ‫اﻷواﻣﺮ‬ ‫وﻣﺠﻤﻮﻋﺔ‬
void main()
{
TRISB=0B00000000;
PORTB=0B10100011;
}
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

 
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‫ﯾﻀﻲء‬‫ﻟﻦ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

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;
}
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
Mikroc
decimalbinary
hexadecimal 
 
10100011 
QConvertor 
 
binary 
 
 
 


 
 
‫ھﻨﺎ‬ ‫اﺿﻐﻂ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
 

B0B7 

 
 
 
 
 
 
 
 
 
 
 
 

 
7805
+٥‫ﻓﻮﻟﺖ‬VDD
‫ﻓﻮﻟﺖ‬ ‫ﺻﻔﺮ‬VSS
‫ﻣﻘﺎوﻣﺔ‬٤٢٠‫أوم‬
‫ﻣﻘﺎوﻣﺔ‬١٠‫ﻛﯿﻠﻮ‬
‫ﻣﻜﺜﻒ‬٢٢‫ﺑﯿﻜﻮ‬
‫ﺑﻄﺎرﯾﺔ‬٩‫ﻓﻮﻟﺖ‬
VDD
VSS
VSS
‫ﺍﻟﺘﺠﺮﺑﺔ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

PORTBB0B7
TRISB 
TRISB=0; 

PORTB=0B11111111;PORTB=0XFF;
PORTB=0; 





 
Void main()
{
TRISB=0;
PORTB=0XFF;
PORTB=0;
}
PORTB=0;PORTB=0XFF;

‫ﺛﻢ‬ ‫ﯾﻠﯿﮫ‬ ‫اﻟﺬي‬ ‫ﺛﻢ‬ ‫اﻷﻣﺮ‬ ‫ﺳﯿﻨﻔﺬ‬ ‫اﻟﺒﻚ‬
‫ﻣﻨﺘﮭﻰ‬ ‫ﻓﻲ‬ ‫وھﻜﺬا‬ ‫ﯾﻠﯿﮫ‬ ‫اﻟﺬي‬
‫اﻟﺴﺮﻋﺔ‬..
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

 



Delay_ms(500);
 
Delay_ms(250);
 
Void main()
{
TRISB=0;
PORTB=0xFF;
delay_ms(1000);
PORTB=0;
}
delay_ms(500); 




 
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

 
LOOP:
…………………..
…………………..
…………………..
goto LOOP;
 
void main()
{
TRISB=0; 
Loop:
PORTB=0XFF;
delay_ms(1000);
PORTB=0;
Delay_ms(1000);
goto loop; 
}

 
‫اﻟﺬي‬ ‫اﻟﻜﻮد‬ ‫ﻧﻜﺘﺐ‬ ‫اﻟﻤﻨﻄﻘﺔ‬ ‫ھﺬه‬ ‫ﻓﻲ‬
‫ﺑﺈﺳﺘﻤﺮار‬ ‫ﯾﺘﻜﺮر‬ ‫أن‬ ‫ﻧﺮﯾﺪه‬.
‫أﺧﺮى‬ ‫ﻣﺮة‬ ‫اﻟﺒﻚ‬ ‫إﻟﯿﮫ‬ ‫ﺳﯿﺮﺟﻊ‬ ‫اﻟﺬي‬ ‫اﻟﻌﻨﻮان‬ ‫ھﻮ‬ ‫ھﺬا‬
‫ﻓﻲ‬ ‫اﻟﺮﺟﻮل‬ ‫ﺟﻤﯿﻞ‬ ‫ﺳﯿﻮﻇﻒ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬PortB‫ﻛﺨﺮج‬
‫ﺗﻀﻲء‬ ‫اﻟﻠﯿﺪات‬ ‫ﺟﻤﯿﻊ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬
‫اﻟﻠﯿﺪات‬ ‫ﺟﻤﯿﻊ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬‫ﺗﻄﻔﺊ‬
‫ﯾﻠﯿﮫ‬ ‫اﻟﺬي‬ ‫اﻷﻣﺮ‬ ‫ﯾﻨﻔﺬ‬ ‫ﺛﻢ‬ ‫ﺛﺎﻧﯿﺔ‬ ‫ﻟﻤﺪة‬ ‫ﯾﻨﺘﻈﺮ‬ ‫اﻟﺒﻚ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬
‫ﯾﻠﯿﮫ‬ ‫اﻟﺬي‬ ‫اﻷﻣﺮ‬ ‫ﯾﻨﻔﺬ‬ ‫ﺛﻢ‬ ‫ﺛﺎﻧﯿﺔ‬ ‫ﻟﻤﺪة‬ ‫ﯾﻨﺘﻈﺮ‬ ‫اﻟﺒﻚ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬
‫اﻟﺬي‬ ‫اﻟﻌﻨﻮان‬ ‫ﺑﻌﺪ‬ ‫اﻟﺘﻲ‬ ‫اﻷواﻣﺮ‬ ‫ﻟﯿﻨﻔﺬ‬ ‫ﯾﺬھﺐ‬ ‫اﻟﺒﻚ‬ ‫ﺳﯿﺠﻌﻞ‬ ‫اﻷﻣﺮ‬ ‫ھﺬا‬
‫اﺳﻤﮫ‬loop
‫اﻟﻌﻨﻮان‬ ‫إﻟﻰ‬ ‫اذھﺐ‬ ‫اﻷﻣﺮ‬ ‫ھﺬ‬ ‫ﻣﻌﻨﻰ‬loop‫ﺑﻌﺪه‬ ‫اﻟﺘﻲ‬ ‫اﻷواﻣﺮ‬ ‫ﺗﻨﻔﯿﺬ‬ ‫واﺑﺪأ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
PORTB=0;

 
Ahmad
 
ahmad: 
…………………..
…………………..
…………………..
goto ahmad;
Syntax
 
enter
 
void main() 
{ TRISB=0; 
PORTB=0XFF;} 
;
enter 
void main() 
{ TRISB=0;PORTB=0XFF;} 
 
‫اﻟﻤﻨﻄﻘﺔ‬ ‫ھﺬه‬ ‫ﻓﻲ‬‫اﻟﺬي‬ ‫اﻟﻜﻮد‬ ‫ﻧﻜﺘﺐ‬
‫ﺑﺈﺳﺘﻤﺮار‬ ‫ﯾﺘﻜﺮر‬ ‫أن‬ ‫ﻧﺮﯾﺪه‬.
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
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;}
 

 
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
 
 


 
 proteus
 
 
 
 
 
 
 
 MikroC






‫ﺍﻟﺘﺠﺮﺑﺔ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
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;}
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
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);
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
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
*/
 
 

Weitere ähnliche Inhalte

Andere mochten auch

Communication protocol presentation
Communication protocol presentationCommunication protocol presentation
Communication protocol presentationGopi A
 
Synchronous and asynchronous clock
Synchronous and asynchronous clockSynchronous and asynchronous clock
Synchronous and asynchronous clockNallapati Anindra
 
Serial Communication Interfaces
Serial Communication InterfacesSerial Communication Interfaces
Serial Communication Interfacesanishgoel
 
Serial Communication
Serial CommunicationSerial Communication
Serial CommunicationRashmi
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferAnuj Modi
 
Asynchronous and synchronous
Asynchronous and synchronousAsynchronous and synchronous
Asynchronous and synchronousAkhil .B
 
communication-protocols
 communication-protocols communication-protocols
communication-protocolsAli Kamil
 

Andere mochten auch (10)

Communication protocols
Communication protocolsCommunication protocols
Communication protocols
 
Communication protocol presentation
Communication protocol presentationCommunication protocol presentation
Communication protocol presentation
 
Synchronous and asynchronous clock
Synchronous and asynchronous clockSynchronous and asynchronous clock
Synchronous and asynchronous clock
 
Communication protocols
Communication protocolsCommunication protocols
Communication protocols
 
Serial Communication Interfaces
Serial Communication InterfacesSerial Communication Interfaces
Serial Communication Interfaces
 
Synchronous and asynchronous (1)
Synchronous and asynchronous (1)Synchronous and asynchronous (1)
Synchronous and asynchronous (1)
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transfer
 
Asynchronous and synchronous
Asynchronous and synchronousAsynchronous and synchronous
Asynchronous and synchronous
 
communication-protocols
 communication-protocols communication-protocols
communication-protocols
 

Mehr von Mo Ur Ad Es-se

Mehr von Mo Ur Ad Es-se (6)

الدرس الأول
الدرس الأولالدرس الأول
الدرس الأول
 
Rapport
RapportRapport
Rapport
 
Etude du circuit ne 555
Etude du circuit ne 555Etude du circuit ne 555
Etude du circuit ne 555
 
Les familles logiques
Les familles logiquesLes familles logiques
Les familles logiques
 
Compteur synchrone
Compteur synchroneCompteur synchrone
Compteur synchrone
 
Exos de logique séquentielle
Exos de logique séquentielleExos de logique séquentielle
Exos de logique séquentielle
 

mourad 2eme