SlideShare a Scribd company logo
1 of 20
Download to read offline
មហាវិទ្យាល័យ អគ្គិសនី

Microcontroller PIC16F84A

                ័
បង្រៀនងោយ ហួ ជាវនត

ឆ្ ាំ ២០១១- ២០១២
 ន
etIGVICa   Microcontroller ?

   Microcontroller KWCaRbB½næRtYtBinitümYy
    manlkçNdUckMuBüÚT½rEdlfitenAkñúgsMbk Chip
rUbPaBbgðajEpñkxagkñúg   Microcontroller
karBiBN’naBIeCIg PIC16F84A
karBiBN’naBIeCIg PIC16F84A
=   RckcUl signal

=   Rckecj signal

= RckcUlk¾)an
  Rckecjk¾)an
EtvaGaRs½yelI
karsresr Code
karBiBN’naBIeCIg PIC16F84A
RA0, RA1, RA2, RA3, RA4       RtUv)anehAfa      Port A

RB0, RB1, RB2, RB3, RB4, RB5, RB6, RB7           RtUv)anehAfa       Port B

karehAfa   Port A   KWsMedAelIeCIgTaMgGs;rbs;     Port A


karehAfa   Port A Pin 0    KWsMedAelIeCIgrbs;   Port A bit 0 (   eCIg RA0 )
karehAfa   Port A   nig   Port B   manlkçNdUcKña
Vdd   RbPBviC¢man   +5V    nigVss RbPBGviC¢man      0V
etIGVICa Reset or Master clear (MCLR) ?
   Master clear  KWCaeCIgmYysRmab;eFIVeGay
    Microcontroller RtLb;eTAGas½ydæanedImKW   00h
kartP¢ab; Reset or Master clear
kartP¢ab;esoKVIlMeyaledayeRbIRKiHsþal;
 esoKVIlMeyalCaEpñkmYysMxan;EdlmantYnaTIbegáIteGayman   Square Signal
kareRbIR)as; PORT CaRckecj( Output )
   ral;eCIgnimYy²rbs; PORT A, PORT B
    mantémøcrnþGtibrma 25 mA TaMgcrnþviC¢man
    nigcrnþGviC¢man ( Source Current and Sink Current)
kartP¢ab;GMBUl          LED   eTAkan; PORT
CaFmµtaGMBUl LED
sIucrnþRbEhlBI 8mA eTA
16 mA nigtg;süúgRbEhl

BI 1.6V eTA 2.4V .
   ebIGMBUlLEDsIucrnþ
   10mA nigtg;süúg 2V
kareRbIR)as; PORT CaRckcUl( Input )
    témøtg;süúgEdlcUleTAkan;eCIg PORT
                          ebItg;süúgcUlmantémøBI
                          2V~5V tMNageGayHigh


                         ebItg;süúgcUlmantémøBI
                         0V~0.8V tMNageGayLow
kartP¢ab; Button eTARckcUl( Input )
Active High   PORT

                     +5V         +5V
              Low
  Gt;cuc
              High
   cuc
Active Low    PORT

              High
  Gt;cuc
              Low
   cuc
rebobkMnt; PORT Ca   Input or Output

TRISx KWCa Register
mYysRmab;kMnt;muxgar
rbs; PORTx
TRISx = 1
PORTx as Input.
TRISx = 0
PORTx as Output.
karsresrkmµviFIsRmab; PIC16F84A
   TMrg;TUeTArbs;Pasa C sRmab;   Microcontroller

                void main()
                {

                    while(1)
                    {
                      program body;
                    }
                }
karsresrkmµviFIsRmab; PIC16F84A
void main()           CatMbn;sRmab;RbkasGefr
{
                      rWkarkMnt;nUvmuxgarmYycMnYn
    while(1)
    {
                      rbs; Microcontroller
      program body;
    }                 dUcCa Trisb = 0; or
}
                      Portb = 0; CaedIm .
karsresrkmµviFIsRmab; PIC16F84A
void main()
{
                      CatMbn;EdlmandMeNIrkarrhUt
    while(1)
    {                 Example:    GMBUlmYyebIk
      program body;

}
    }                 ehIybiT²CaerogrhUt.
                      eyIgRtUvsresr Code enA
                      kñgtMbn;enH(program body)
                        ú
sresrkmµviFIeGayGMBUlmYyebIkehIybiT²CaerogrhUt
 void main()
 {
     Trisb = 0b00000000;        // Config PortB all pin as output
     Portb = 0b00000000;        // Send data low to all pin of PortB
      while(1)
      {
          Portb = 0b00000001;   // Send data High to bit 0 of PortB
          delay_ms(1000);       // Wait 1 second
          Portb =0b00000000;    // Send data low to all pin of PortB
          delay_ms(1000);       // Wait 1 second
      }
 }
karKUsesoKVI PIC16F84A
GrKuN

More Related Content

What's hot

Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051
logesh waran
 
Algoritma pemrogmraman
Algoritma pemrogmramanAlgoritma pemrogmraman
Algoritma pemrogmraman
noval riansyah
 

What's hot (20)

8051 experiments1
8051 experiments18051 experiments1
8051 experiments1
 
Bunker Level monitoring - Thermal power Plant
Bunker Level monitoring  - Thermal power PlantBunker Level monitoring  - Thermal power Plant
Bunker Level monitoring - Thermal power Plant
 
PIC16F877A interfacing with LCD
PIC16F877A interfacing with LCDPIC16F877A interfacing with LCD
PIC16F877A interfacing with LCD
 
54261508
5426150854261508
54261508
 
Microcontroller primer
Microcontroller primerMicrocontroller primer
Microcontroller primer
 
000682
000682000682
000682
 
Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051
 
OpenPOWER Webinar : Power pc assembly language convention and programming
OpenPOWER Webinar : Power pc assembly language convention and programmingOpenPOWER Webinar : Power pc assembly language convention and programming
OpenPOWER Webinar : Power pc assembly language convention and programming
 
14827 shift registers
14827 shift registers14827 shift registers
14827 shift registers
 
Datasheet 7447
Datasheet 7447Datasheet 7447
Datasheet 7447
 
Algoritma pemrogmraman
Algoritma pemrogmramanAlgoritma pemrogmraman
Algoritma pemrogmraman
 
การบ้าน
การบ้านการบ้าน
การบ้าน
 
Introduction to PIC18FX6J Series MCUs
Introduction to PIC18FX6J Series MCUsIntroduction to PIC18FX6J Series MCUs
Introduction to PIC18FX6J Series MCUs
 
SAP II ARTICTURE ,SAP 2
SAP II ARTICTURE ,SAP 2SAP II ARTICTURE ,SAP 2
SAP II ARTICTURE ,SAP 2
 
Microcontroller lec 2
Microcontroller  lec 2Microcontroller  lec 2
Microcontroller lec 2
 
74 hc hct393
74 hc hct39374 hc hct393
74 hc hct393
 
74ls373
74ls37374ls373
74ls373
 
Datasheet 74 ls90
Datasheet 74 ls90Datasheet 74 ls90
Datasheet 74 ls90
 
Chapter7
Chapter7Chapter7
Chapter7
 
7447 National Semiconductor Datasheet
7447 National Semiconductor Datasheet7447 National Semiconductor Datasheet
7447 National Semiconductor Datasheet
 

Similar to Learn microcontroller pic16f84a

Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copy
mkazree
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
SIGMATAX1
 
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programmingEmbedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programming
Ikhwan_Fakrudin
 
Atmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheetAtmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheet
AlexTronciu
 
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Irfan Qadoos
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontroller
Corrado Santoro
 

Similar to Learn microcontroller pic16f84a (20)

22 Microcontroller Programs
22 Microcontroller Programs22 Microcontroller Programs
22 Microcontroller Programs
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copy
 
Intro2 Robotic With Pic18
Intro2 Robotic With Pic18Intro2 Robotic With Pic18
Intro2 Robotic With Pic18
 
Micro
MicroMicro
Micro
 
moving message display of lcd
 moving message display of lcd moving message display of lcd
moving message display of lcd
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
 
Comande oss
Comande ossComande oss
Comande oss
 
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programmingEmbedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programming
 
PIC18F458_Ritula Thakur.pptx.pdf
PIC18F458_Ritula Thakur.pptx.pdfPIC18F458_Ritula Thakur.pptx.pdf
PIC18F458_Ritula Thakur.pptx.pdf
 
1) Simulate an 8-bit VHDL Adders circuit built using Integer Arithme.pdf
1) Simulate an 8-bit VHDL Adders circuit built using Integer Arithme.pdf1) Simulate an 8-bit VHDL Adders circuit built using Integer Arithme.pdf
1) Simulate an 8-bit VHDL Adders circuit built using Integer Arithme.pdf
 
PIC16F877A C Programming.ppt
PIC16F877A C Programming.pptPIC16F877A C Programming.ppt
PIC16F877A C Programming.ppt
 
Lec12
Lec12Lec12
Lec12
 
Atmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheetAtmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheet
 
UART MCU
UART MCUUART MCU
UART MCU
 
Hardware interfacing basics using AVR
Hardware interfacing basics using AVRHardware interfacing basics using AVR
Hardware interfacing basics using AVR
 
04 adc (pic24, ds pic with dma)
04 adc (pic24, ds pic with dma)04 adc (pic24, ds pic with dma)
04 adc (pic24, ds pic with dma)
 
Basics Of Embedded Systems
Basics Of Embedded SystemsBasics Of Embedded Systems
Basics Of Embedded Systems
 
Practical file
Practical filePractical file
Practical file
 
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontroller
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 

Learn microcontroller pic16f84a