1 / 19

Fundamentals of Programming Languages-II

Fundamentals of Programming Languages-II. Subject Code: 110010 Teaching Scheme Examination Scheme Theory: 1 Hr./Week Online Examination: 50 Marks Practical: 2 Hrs./Week. Unit-I. Microprocessors and Micro-Controllers Architectures and Programming Concepts. 1.7 PIC MICROCONTROLLER SYSTEMS.

jlemay
Download Presentation

Fundamentals of Programming Languages-II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fundamentals of Programming Languages-II Subject Code: 110010 Teaching Scheme Examination Scheme Theory: 1 Hr./Week Online Examination: 50 Marks Practical: 2 Hrs./Week

  2. Unit-I Microprocessors and Micro-Controllers Architectures and Programming Concepts

  3. 1.7 PIC MICROCONTROLLER SYSTEMS

  4. 1.7.1 Introduction • In 1989, Microchip Technology Corporation introduced an 8-bit microcontroller called the PIC which stands for Peripheral Interface Controller. • It has RISC architecture that comes with standard features. • It has on-chip program(code) ROM, data RAM, data EEPROM, timers, ADC, and USART and I/O ports.

  5. PIC18 has 16-bit instruction format i.e. all the instructions are of 16 bit. • PIC18 is a 8-bit microcontroller that can operate at different speeds varying from DC to 40MHz. • PIC is a RISC processor. • Analog to digital conversion with 10-bit resolution. • Power saving modes. • Controller Area Network(CAN) • SRAM & EEPROM

  6. Harvard Architecture • Von Neumann Architecture: • Fetches instructions and data from a single memory space • Limits operating bandwidth • Harvard Architecture: • Uses two separate memory spaces for program instructions and data • Improved operating bandwidth • Allows for different bus widths

  7. Features of PIC18F77a

  8. PIC Microcontroller Architecture Block diagram

  9. The Program Memory: It may also provide the instructions in case of internal memory access. This program memory is also connected to the instruction register through the ROM latch like system interface data bus. • 8-level Stack: A 8 level stack is provided for storing the return address in program counter. • Internal Data RAM is provided whose data lines are connected to the system data bus. The address is taken through FSR, a file select registers that provide 8 bit address required to access RAM.

  10. ALU gets one of the input operand from W register (WREG) or IR. The other operand may be given either from a register or a memory location, and hence the other input side of ALU is connected to the internal data bus. • Different reset mechanisms • Power-on Reset (POR) • MCLR Reset during normal operation • MCLR reset during sleep • Watchdog Timer (WDT) • Programmable Brown-out Reset (PBOR) • RESET Instruction • Stack full reset • Stack Underflow Reset • Watchdog timer resets the processor if it hangs.

  11. A configuration bit, BOREN(Brown out Reset enable), can enable or disable the Brown-out Reset circuitry. • There are five I/O ports (A, B, C, D, E) available on PIC18F877 device. • Each port has three registers for its operation • TRIS register (data direction register) • PORT register (reads the levels on the pins of the device) • LAT register (Output latch): The Data Latch (LAT register) is useful for read-modify-write operations on the value that the I/O pins are driving.

  12. There are three timers (Timer 0 to Timer 2) of 8-10 bits with different features. Timers have features like Compare, Capture and PWM(CCP). • There is also a 10 bit Analog to Digital Converter (ADC). Hence the resolution of 1024 levels. • PIC18f877 also has an Analog Comparator. • Serial peripheral interface (SPI) port : It is a full duplex port i. e. it allows 8 bits of data to be synchronously transmitted and received simultaneously.

  13. USART port: It is Universal Synchronous Asynchronous Receiver Transmitter. It has a USART which can be configured as a full-duplex asynchronous system that can communicate with peripheral devices such as CRT terminals and personal computers.

  14. The PIC18 Memory Organization • There are three sections of memory in PIC18 namely program memory, data RAM and data EEPROM. • Data Memory and SFR Basics • Data memory is implemented using SRAM (static RAM). • Each location in the data memory is also referred to as a register. • The PIC18f877 microcontroller supports 368 bytes of data memory locations.

  15. It requires 9 bits of address to select one of the data registers. • There are four banks of 128 registers each. • The banks contain the General Purpose Registers and the Special Function Registers. Bits RP1 and RP0 are the bank select bits.

  16. Data Memory Map

  17. Program Memory Organization • PIC18 microcontroller has a 13 bit program counter and hence is capable of addressing a 8KB program memory space.

  18. It has a 8-entry return address stack; which is used to hold return addresses for subroutine call and interrupt processing. • The reset vector is at address 0000H. • The interrupt vector address is 0004H. • The address 0005H onwards is user memory, divided into four pages to store the programs.

  19. Thank You

More Related