1 / 31

Micro controllers

Micro controllers. A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package. Types of Microcontrollers. Embeded (Self-contained) 8 bit 16-32 bit Digital Signal Processors. Basic Features. Processor reset Device clocking

lotta
Download Presentation

Micro controllers

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. Micro controllers • A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.

  2. Types of Microcontrollers • Embeded (Self-contained) 8 bit • 16-32 bit • Digital Signal Processors

  3. Basic Features • Processor reset • Device clocking • Central processor • Program and Variable Memory (RAM) • I/O pins • Instruction cycle timers

  4. More Sophisticated Features • Built-in monitor/debugger program • Interrupt capability • Analog I/O (PWM and variable dc I/O • Serial I/O (synchronous, a synchronous) • Parallel I/O (including direct interface to a master processor • External memory interface

  5. Processor Architecture • CISC • Large amount of instructions each carrying out a different permutation of the same operation • Functionality of the instructions is more dependent upon the processor’s designer

  6. Processor Architecture • RISC • Fundamental set of instructions • More control for users to design their own operations

  7. Processor Architecture • Princeton (Van Neumann) architecture • Common memory for program and data • Simple chip design • Execution of an instruction can take multiple cycles

  8. Processor Architecture • Harvard architecture • Separate memory space program and data • Instructions are executed in one cycle • Easier timing of loops and delays

  9. Processor Architecture • Princeton architecture example Mov acc, reg Cycle 1 Read instruction Cycle 2 Read data out of Ram and put into Acc

  10. Processor Architecture • Harvard architecture example Mov acc, reg Cycle 1 Execute previous instruction Read “move acc, reg” Cycle 2 Execute “move acc, reg” instruction

  11. Microchip PIC Micro controllers(PIC 16F877)

  12. Hardware Architecture • PIC Microcontrollers have following main features: • Harvard Architecture • RISC Feature • CPU pipelines instruction fetching and execution in order to achieve an execution of one instruction at every cycle

  13. Memory Organization • Program Memory • Register File Memory

  14. Program Memory • Used for storing compiled code • Each location is 14 bits long • Every instruction is coded as a 14 bit word • Addresses H’000’ and H’004’ are treated in a special way • PC can address up to 8K addresses

  15. Register File Memory • Consist of 2 Components • General Purpose Register (GPR) Files (RAM) • Special Purpose Register (SPR) files • This portion of memory is separated into banks of 128 bytes long

  16. Register Addressing Modes • There are 3 types of addressing modes in PIC • Immediate Addressing • Movlw H’0F’ • Direct Addressing • Indirect Addressing

  17. Direct Addressing • Uses 7 bits of 14 bit instruction to identify a register file address • 8th and 9th bit comes from RP0 and RP1 bits of STATUS register. • Exp: Z equ D’2’ btfss STATUS, Z

  18. Indirect Addressing • Full 8 bit register address is written the special function register FSR • INDF is used to get the content of the address pointed by FSR • Exp : A sample program to clear RAM locations H’20’ – H’2F’ .

  19. Some CPU Registers • STATUS • PC • W • PCL • PCLATH

  20. Instruction Set • Every Instruction is coded in a 14 bit word • Each instruction takes one cycle to execute • Only 35 instructions to learn (RISC)

  21. Instruction Set • Uses 7 bits of 14 bit instruction to identify register file address • For most instructions, W register is used as a source register • The result of an operation can be stored back to the W register or back to source register

  22. Some Arithmetic Operations • addwf FSR, w ; Add w to FSR and put result in w • iorwf TMR0, f ; Inclusive OR w with TMR0 and store result in TMR0 • addwf reg ; Add content of the reg to content of the w and store the result back into reg (source)

More Related