Pic microcontroller [autosaved] [autosaved]

3,550 views
3,142 views

Published on

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

No Downloads
Views
Total views
3,550
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
246
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Pic microcontroller [autosaved] [autosaved]

  1. 1. PIC MICROCONTROLLERFeatures & Applications
  2. 2. WHAT IS A MICROCONTROLLER• A smaller computer• On-chip RAM, ROM, I/O ports...• Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X CPU RAM ROM A single chip Serial Microcontroller I/O Timer COM Port Port
  3. 3. HOW IT IS DIFFERENT FROM A MICROPROCESSORGeneral-purpose microprocessor• CPU for Computers• No RAM, ROM, I/O on CPU chip itself• Example:Intel’s x86, Motorola’s 680x0 Data Bus CPU General- Serial Purpose RAM ROM I/O Timer COM Micro- Port Port processor Address Bus
  4. 4. Types of Microcontrollers
  5. 5. IMPORTANT FEATURES OF PIC 16F73• High performance RISC CPU.• There is Only 35 single word instructions.• 4K Bytes Flash Program Memory.• 192 Bytes RAM.• Three I/O ports – PORT A = 6 Bit. PORT B & C = 8 Bit.• on-chip RC Oscillator.
  6. 6. PIN DESCRIPTION
  7. 7. PIC MEMORY• The PIC 16F73 has 4 kbytes of program memory.• 192 Bytes Registers as Data Memory : Special Function Registers: used to control peripherals and PIC behaviors. General Purpose Registers: used for temporary storage of data.
  8. 8. PIC PROGRAM MEMORY Takes a max of 8 addresses, the ninth address will write over the first. When the controller is reset, program execution starts from here. If interrupted, program execution continues from here.
  9. 9. PIC DATA MEMORYThe mostimportantregistershaveaddressesin all thefourbanks The data memory is divided into 4 memory banks
  10. 10. PERIPHERAL FEATURES OF PIC• Three timers –Timer0: 8-bit timer Timer1: 16-bit timer Timer2: 8-bit timer• Two PWM modules• 8-bit, 5-channel Analog-to-Digital converter.• USART And SSP Serial Communication.• Brown-out detection circuitry with Watchdog timer.
  11. 11. PIC Peripherals: TimersThe PIC16F73 has 3 TimersThey can be used as- TIMER: When The clock source is the internal crystal frequency of the PIC. COUNTER: When an external pulse is given from the input pin. For timer0 input pin is pin number 6 i.e TOCKI For timer1 input pin is pin number 11 i.e T1CKI
  12. 12. Special features of timersOnly timer0 and timer1 can be used as a Timer and Counter. Timer2 is related with PWM wave generation.Every timer is associated with pre-scaler factor.Generate interrupts on timer overflow.There is a Watchdog Timer with brown out detection circuit.
  13. 13. REGISTER ASSOCIATED WITH TIMER0 OPTION_REG Register
  14. 14. REGISTER ASSOCIATED WITH TIMER1 T1CON:Timer1 Control Register
  15. 15. REGISTER ASSOCIATED WITH TIMER1 T1CON:Timer1 Control Register
  16. 16. PIC Peripherals: PWMPWM stands for pulse width modulation.It is generally used to slow down the speed ofmotors by varying the duty cycle of the period.DUTY CYCLE is given by- Ton time / T total time The ratio between ON and OFF state of the pulse determines the amount of energy tranferred to the device.
  17. 17. BLOCK DIAGRAM AND OUTPUT WAVEFORM OF PWM
  18. 18. PIC Peripherals: ADC• ADC stands for analog to digital comparator.• In PIC16F73 there is 8 bit , 5 channels ADC.Therefore there are 256 combinations• For conversion of analog voltage to digital first we have to make a least count matching between the two devices. Least Count=Vref. /resolution
  19. 19. BLOCK DIAGRAM OF ANALOG TO DIGITAL CONVERTERThe A/D module has four registers. These registers are: A/D Result Register (ADRES) A/D Control Register0 (ADCON0) A/D Control Register1 (ADCON1)
  20. 20. PIC Peripherals: USART And SSP Serial Communication
  21. 21. USART REGISTERSUSART stands for synchronous asynchronous serial receiver and transmitterIT DEALS WITH TWO REGISTERS:TXSTA : Transmit status and control register.RXSTA : Receive status and control register.In synchronous communication we have to give the same clock to both the transmitter and receiver whereasIn asynchronous communication we have to make the baud rate( data transfer rate ) of both the transmitter and receiver same.
  22. 22. INTERFACING TO PC
  23. 23. SSP SERIAL COMMUNICATIONSSP stands for synchronous serial peripherals.InPIC16F73 there are 2 SSP’s-I2C AND SPII2C COMMUNICATION
  24. 24. SPI COMMUNICATION
  25. 25. APPLICATIONSINTERFACING OF LCD WITH PIC16F73PIC16F73 PORT PINS
  26. 26. INTERFACING OF SEVEN SEGMENT DISPLAY WITH PIC16F73PIC16F73 PIC 16F73
  27. 27. Thank You ForYour Attendance

×