Your SlideShare is downloading. ×
Learn microcontroller pic16f84a
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Learn microcontroller pic16f84a

318

Published on

Introduction to Microcontroller PIC16F84A and how to write program for Microcontroller. The program that i use to write is MikroC. You can download this program by:​http://eelibrary.wordpress.com

Introduction to Microcontroller PIC16F84A and how to write program for Microcontroller. The program that i use to write is MikroC. You can download this program by:​http://eelibrary.wordpress.com

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
318
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. មហាវិទ្យាល័យ អគ្គិសនីMicrocontroller PIC16F84A ័បង្រៀនងោយ ហួ ជាវនតឆ្ ាំ ២០១១- ២០១២ ន
  • 2. etIGVICa Microcontroller ? Microcontroller KWCaRbB½næRtYtBinitümYy manlkçNdUckMuBüÚT½rEdlfitenAkñúgsMbk Chip
  • 3. rUbPaBbgðajEpñkxagkñúg Microcontroller
  • 4. karBiBN’naBIeCIg PIC16F84A
  • 5. karBiBN’naBIeCIg PIC16F84A= RckcUl signal= Rckecj signal= RckcUlk¾)an Rckecjk¾)anEtvaGaRs½yelIkarsresr Code
  • 6. karBiBN’naBIeCIg PIC16F84ARA0, RA1, RA2, RA3, RA4 RtUv)anehAfa Port ARB0, RB1, RB2, RB3, RB4, RB5, RB6, RB7 RtUv)anehAfa Port BkarehAfa Port A KWsMedAelIeCIgTaMgGs;rbs; Port AkarehAfa Port A Pin 0 KWsMedAelIeCIgrbs; Port A bit 0 ( eCIg RA0 )karehAfa Port A nig Port B manlkçNdUcKñaVdd RbPBviC¢man +5V nigVss RbPBGviC¢man 0V
  • 7. etIGVICa Reset or Master clear (MCLR) ? Master clear KWCaeCIgmYysRmab;eFIVeGay Microcontroller RtLb;eTAGas½ydæanedImKW 00h
  • 8. kartP¢ab; Reset or Master clear
  • 9. kartP¢ab;esoKVIlMeyaledayeRbIRKiHsþal; esoKVIlMeyalCaEpñkmYysMxan;EdlmantYnaTIbegáIteGayman Square Signal
  • 10. 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)
  • 11. kartP¢ab;GMBUl LED eTAkan; PORTCaFmµtaGMBUl LEDsIucrnþRbEhlBI 8mA eTA16 mA nigtg;süúgRbEhlBI 1.6V eTA 2.4V . ebIGMBUlLEDsIucrnþ 10mA nigtg;süúg 2V
  • 12. 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
  • 13. kartP¢ab; Button eTARckcUl( Input )Active High PORT +5V +5V Low Gt;cuc High cucActive Low PORT High Gt;cuc Low cuc
  • 14. rebobkMnt; PORT Ca Input or OutputTRISx KWCa RegistermYysRmab;kMnt;muxgarrbs; PORTxTRISx = 1PORTx as Input.TRISx = 0PORTx as Output.
  • 15. karsresrkmµviFIsRmab; PIC16F84A TMrg;TUeTArbs;Pasa C sRmab; Microcontroller void main() { while(1) { program body; } }
  • 16. karsresrkmµviFIsRmab; PIC16F84Avoid main() CatMbn;sRmab;RbkasGefr{ rWkarkMnt;nUvmuxgarmYycMnYn while(1) { rbs; Microcontroller program body; } dUcCa Trisb = 0; or} Portb = 0; CaedIm .
  • 17. karsresrkmµviFIsRmab; PIC16F84Avoid main(){ CatMbn;EdlmandMeNIrkarrhUt while(1) { Example: GMBUlmYyebIk program body;} } ehIybiT²CaerogrhUt. eyIgRtUvsresr Code enA kñgtMbn;enH(program body) ú
  • 18. 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 } }
  • 19. karKUsesoKVI PIC16F84A
  • 20. GrKuN

×