SlideShare a Scribd company logo
1 of 18
Download to read offline
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

IC 
 
  
  

 
  
 
Mini-Computer
ProcessorRAMROM

Pins
 
 
 
 
MicroController 
controller 
 
 
Micro 
 
 
 
 
 
‫ﺍﻷﻭﻝ‬ ‫ﺍﻟﺒﺎﺏ‬:‫ﺍﳌﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬ ‫ﻋﻠﻰ‬ ‫ﺍﻟﺘﻌﺮﻑ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬


   
 
 
              


 
 

 



           
 

 



 


                

 
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬


 


 






 
 


 
 

PIC 
 
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
PICAVR
PICMICROCHIP
 
 
 
  
 
 
 
 
 
 
PORTAA0,A1,A2,A3,A4 
PORTBB0B7
R 
A0RA0 
 
‫ﻣﻔﺎﻫﻴﻢ‬‫ﺃﺳﺎﺳﻴﺔ‬
‫ﺍﻟ‬‫ﻧﺮﺳﻢ‬‫ـ‬PIC‫ﺍﻟﺸﻜﻞ‬‫ﺑﻬﺬﺍ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
VDD
VDD
 
VSS
 
VDD,VSS 
 
            
           
MicrocontrollerLed
  bit         PIC
 
 
 
 
 
 
 
 
 
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
 
PIC16f84a
LEDB0

 

 
 
 
 
 
 
 
 
  
 
7805
 

 
‫ﺍﻟﺘﺠﺮﺑﺔ‬
7805
+٥‫ﻓﻮﻟﺖ‬VDD
‫ﻓﻮﻟﺖ‬ ‫ﺻﻔﺮ‬VSS
‫ﻣﻘﺎوﻣﺔ‬٤٢٠‫أوم‬
‫ﻣﻘﺎوﻣﺔ‬١٠‫ﻛﯿﻠﻮ‬
‫ﻣﻜﺜﻒ‬٢٢‫ﺑﯿﻜﻮ‬
‫ﺑﻄﺎرﯾﺔ‬٩‫ﻓﻮﻟﺖ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 

 
LED
LED

 

 
 
 
 
 
 
 
 
 
 
7805
+٥‫ﻓﻮﻟﺖ‬VDD
‫ﻓﻮﻟﺖ‬ ‫ﺻﻔﺮ‬VSS
‫ﻣﻘﺎوﻣﺔ‬٤٢٠‫أوم‬
‫ﻣﻘﺎوﻣﺔ‬١٠‫ﻛﯿﻠﻮ‬
‫ﻣﻜﺜﻒ‬٢٢‫ﺑﯿﻜﻮ‬
‫ﺑﻄﺎرﯾﺔ‬٩‫ﻓﻮﻟﺖ‬
VDD
VSS
VSS
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬


B0
     MikroC
setup 
  
 
 
 
 
 
 
 
 
 
 
 
‫ﻟﻠﻤﺸﺮوع‬ ‫اﺳﻢ‬ ‫ﻧﺨﺘﺎر‬
‫ھﻨﺎ‬ ‫وﻧﻜﺘﺒﮫ‬
‫اﻟ‬ ‫ﻣﺴﺎر‬ ‫ﻧﻜﺘﺐ‬ ‫ھﻨﺎ‬‫ﻤﺸﺮوع‬
‫ﺳﯿﺤﻔﻆ‬ ‫اﻟﺬي‬ ‫اﻟﻤﻜﺎن‬ ‫اي‬
‫ﻓﯿﮫ‬‫اﻟﺒﻚ‬ ‫ﻧﻮع‬ ‫ﻧﺨﺘﺎر‬
‫ﻓﻲ‬ ‫اﻟﻤﺴﺘﺨﺪم‬
‫اﻟﻤﺸﺮوع‬
‫اﻟﻤﺆﻗﺖ‬ ‫ﺗﺮدد‬ ‫ﻧﻜﺘﺐ‬ ‫ھﻨﺎ‬
‫ھﺬا‬ ‫ﻣﺸﺮوﻋﻨﺎ‬ ‫ﻓﻲ‬ ‫اﻟﻤﺴﺘﺨﺪم‬
‫اﻟﻤﻮﺟﻮدة‬ ‫اﻟﻘﯿﻢ‬ ‫ﺑﻨﻔﺲ‬ ‫اﻛﺘﺒﮫ‬
‫ھﻨﺎ‬1.04
‫اﻻﺧﺘﯿﺎر‬ ‫ھﺬا‬ ‫اﺧﺘﺎر‬
‫ﻟﻨﻮع‬ ‫ﯾﺸﯿﺮ‬ ‫وھﻮ‬
‫اﻟﻤﺆﻗﺖ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
 
 
 
 
 
 
 
 
 
         
B0 
 
 
 
 
 
 
 
void main()
{
TRISB=0B00000000;
PORTB=0B00000001;
}
‫ﺑﺎﻟﻜﻮد‬ ‫ﯾﺴﻤﻰ‬ ‫ﻣﺎ‬ ‫أو‬ ‫اﻷواﻣﺮ‬ ‫ھﻲ‬ ‫ھﺬه‬
‫اﻟﺒﺮﻧﺎﻣﺞ‬ ‫ﻧﺴﻤﯿﮭﺎ‬ ‫اﻷواﻣﺮ‬ ‫وﻣﺠﻤﻮﻋﺔ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

; 


build project
Ctrl+F9
 
 
 
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬

build project 
MikroChex

hexfirst_experiment.hex 


hex 
 
 
 
 
 
 
 
 
PICPgm Programmer
 
 
 
‫داﺋﺮة‬ ‫اﻟﻨﺼﻒ‬ ‫ﻻﺣﻆ‬
‫ﻟﻠﻄﺮﯾﻘﺔ‬ ‫ﺗﺸﯿﺮ‬ ‫واﻟﺘﻲ‬
‫ﻟﺘﺮﻛﯿﺐ‬ ‫اﻟﺼﺤﯿﺤﺔ‬
‫اﻟﺒﻚ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
hex
            JDM
 
 
 
 
 
 
 
 
 
 
 
 
 
 
OK
‫ﻗﺎﺋﻤﺔ‬ ‫ﻧﺨﺘﺎر‬
hardware‫ﺛﻢ‬
‫ھﻨﺎ‬ ‫ﺑﺎﻟﻤﺎوس‬ ‫ﻧﻀﻐﻂ‬
‫اﺳﺘﺨﺪﻣﮫ‬ ‫اﻟﺬي‬ ‫اﻟﻨﻮع‬
‫ذﻛﺮت‬ ‫ﻛﻤﺎ‬ ‫اﻟﻜﺘﺎب‬ ‫ﻓﻲ‬
‫ھﻮ‬JDM
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
Browse
first_experiment.hex 
 
 
 
 
Open
 
PIC16F84A 
 
‫ھﻨﺎ‬ ‫اﺿﻐﻂ‬
‫ھﻨﺎ‬ ‫اﺿﻐﻂ‬
‫اﻟﻤﻠﻒ‬ ‫ﺗﺤﺪﯾﺪ‬ ‫ﺑﻌﺪ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
 
 
 
 
 
 
 
 

 
 

 

 
 
 
‫ھﻨﺎ‬ ‫اﺿﻐﻂ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
MikroC 
 
 
 
 
 
 
 void main()

void

void main() 
 

TRIS
PORTBTRISBPORTA
TRISA 
TRIS 
0          OUTPUT
1          INPUT 
void main()
{
………………..
………………..
}
‫اﻟﻜﻮد‬ ‫ﻧﻜﺘﺐ‬ ‫اﻟﻤﻨﻄﻘﺔ‬ ‫ھﺬه‬ ‫ﻓﻲ‬
‫اﻟﻘﻮﺳﯿﻦ‬ ‫ﺑﯿﻦ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
PORTBB0
TRISBB0
B0 
B0TRISB
BIT

TRISB 
 
 
 
 
B0B7 
              
TRISB=0B00000000; 
TRISB=0B00000000 
 
0B 
B0
PORTPORT 
1 HI0LOW - 
0 0 0 0 0 0 0 0
B0B1B2B3B4B5B6B7
TRISB
‫اﻟﺮﺟﻞ‬ ‫رﻗﻢ‬
B0B1B2B3B4B5B6B7
‫ﺑﺎﻟﺮﺟﻞ‬ ‫ﺧﺎص‬ ‫اﻟﺒﺖ‬ ‫ھﺬا‬‫رﻗﻢ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
B0HIPORTB
B0 
PORTBTRISB
B0B7
 
 
 
 
 
PORTB

PORTB=0B00000001; 
PORTB=0B00000001 
 
 
PORTB=0B00000001
;PORTB=0B00000001;TRIS
TRISB=0B00000000;{ }
TRISPORTsyntax
hex 
 
0 0 0 0 0 0 0 1
PORTB
B0B1B2B3B4B5B6B7
B0B1B2B3B4B5B6B7
‫ﺑﺎﻟﺮﺟﻞ‬ ‫ﺧﺎص‬ ‫اﻟﺒﺖ‬ ‫ھﺬا‬‫رﻗﻢ‬
‫ﺍﻟﻤﺎﻳﻜﺮﻭﻛﻨﺘﺮﻭﻟﺮ‬‫ﺑﺮﻣﺠﺔ‬‫ﺍﺣﺘﺮﻑ‬‫ﻛﺘﺎﺏ‬
 
 
 
 
 
 
 
void main() 
B0B7TRISB
 
B0
PORT 
;PORTBTRISB
portbtrisb 
 
MikroC
 

 
 
void main()
{
TRISB=0B00000000;
PORTB=0B00000001;
}

More Related Content

What's hot

Safe commercial airplane with separable cabins
Safe commercial airplane with separable cabinsSafe commercial airplane with separable cabins
Safe commercial airplane with separable cabinsNaser Ziaei
 
Instrumentation & Control For Thermal Power Plant
Instrumentation & Control For Thermal Power PlantInstrumentation & Control For Thermal Power Plant
Instrumentation & Control For Thermal Power PlantSHIVAJI CHOUDHURY
 
CCC_Turbomachinery_Controls_System.pdf
CCC_Turbomachinery_Controls_System.pdfCCC_Turbomachinery_Controls_System.pdf
CCC_Turbomachinery_Controls_System.pdfssuser5599ce
 
Gas turbine Power Station Internship Report
Gas turbine Power Station Internship ReportGas turbine Power Station Internship Report
Gas turbine Power Station Internship ReportAsad Hussain
 
Final Year Project report on quadcopter
Final Year Project report on quadcopter Final Year Project report on quadcopter
Final Year Project report on quadcopter Er. Ashutosh Mishra
 
UltraCapacitor
UltraCapacitorUltraCapacitor
UltraCapacitordhimancool
 
Understanding DGA Techniques & Interpretations Presentation
Understanding DGA Techniques & Interpretations PresentationUnderstanding DGA Techniques & Interpretations Presentation
Understanding DGA Techniques & Interpretations PresentationLumaSense Technologies
 
Primo pinturas funilaria de veículos
Primo pinturas funilaria de veículosPrimo pinturas funilaria de veículos
Primo pinturas funilaria de veículosprimopinturasveiculos
 
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...Kinetrol USA
 
ASTM A105 material standard
ASTM A105 material standard ASTM A105 material standard
ASTM A105 material standard wang yilia
 
Coal Handling Plant ( CHP )
Coal Handling Plant ( CHP )Coal Handling Plant ( CHP )
Coal Handling Plant ( CHP )SHRIKANT KHATING
 
Coal Handling Plant
Coal Handling PlantCoal Handling Plant
Coal Handling PlantAshrant Dass
 
Wireless Charging of Electric Vehicles
Wireless Charging of Electric VehiclesWireless Charging of Electric Vehicles
Wireless Charging of Electric VehiclesPritam Kumar Singh
 

What's hot (20)

Safe commercial airplane with separable cabins
Safe commercial airplane with separable cabinsSafe commercial airplane with separable cabins
Safe commercial airplane with separable cabins
 
VOltaire, CANDIDE : chapitre 19 - Surinam
VOltaire, CANDIDE : chapitre 19 - SurinamVOltaire, CANDIDE : chapitre 19 - Surinam
VOltaire, CANDIDE : chapitre 19 - Surinam
 
Instrumentation & Control For Thermal Power Plant
Instrumentation & Control For Thermal Power PlantInstrumentation & Control For Thermal Power Plant
Instrumentation & Control For Thermal Power Plant
 
CCC_Turbomachinery_Controls_System.pdf
CCC_Turbomachinery_Controls_System.pdfCCC_Turbomachinery_Controls_System.pdf
CCC_Turbomachinery_Controls_System.pdf
 
QC Welding Inspector Interview Question & Answers.pdf
QC Welding Inspector Interview Question & Answers.pdfQC Welding Inspector Interview Question & Answers.pdf
QC Welding Inspector Interview Question & Answers.pdf
 
PCB Assembly Manual insertion line
PCB Assembly Manual insertion linePCB Assembly Manual insertion line
PCB Assembly Manual insertion line
 
Gas turbine Power Station Internship Report
Gas turbine Power Station Internship ReportGas turbine Power Station Internship Report
Gas turbine Power Station Internship Report
 
Final Year Project report on quadcopter
Final Year Project report on quadcopter Final Year Project report on quadcopter
Final Year Project report on quadcopter
 
Radar Absorption Materials
Radar Absorption MaterialsRadar Absorption Materials
Radar Absorption Materials
 
UltraCapacitor
UltraCapacitorUltraCapacitor
UltraCapacitor
 
Understanding DGA Techniques & Interpretations Presentation
Understanding DGA Techniques & Interpretations PresentationUnderstanding DGA Techniques & Interpretations Presentation
Understanding DGA Techniques & Interpretations Presentation
 
Primo pinturas funilaria de veículos
Primo pinturas funilaria de veículosPrimo pinturas funilaria de veículos
Primo pinturas funilaria de veículos
 
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
 
ASTM A105 material standard
ASTM A105 material standard ASTM A105 material standard
ASTM A105 material standard
 
Project Report on Drone.pptx
Project Report on Drone.pptxProject Report on Drone.pptx
Project Report on Drone.pptx
 
Coal Handling Plant ( CHP )
Coal Handling Plant ( CHP )Coal Handling Plant ( CHP )
Coal Handling Plant ( CHP )
 
Corrosion theory.pdf
Corrosion theory.pdfCorrosion theory.pdf
Corrosion theory.pdf
 
Coal Handling Plant
Coal Handling PlantCoal Handling Plant
Coal Handling Plant
 
Shivesh ntpc ppt
Shivesh ntpc pptShivesh ntpc ppt
Shivesh ntpc ppt
 
Wireless Charging of Electric Vehicles
Wireless Charging of Electric VehiclesWireless Charging of Electric Vehicles
Wireless Charging of Electric Vehicles
 

ميكروكنترولر بشرح م احمد سميرفايد