The PIC Microcontrollers - PowerPoint PPT Presentation

Loading...

PPT – The PIC Microcontrollers PowerPoint presentation | free to download - id: 5b029c-MGQzO



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

The PIC Microcontrollers

Description:

The PIC Microcontrollers The PIC microcontroller was designed by General Instruments The PIC microcontroller is a complete computer contained within one chip – PowerPoint PPT presentation

Number of Views:1423
Avg rating:3.0/5.0
Slides: 22
Provided by: war781
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: The PIC Microcontrollers


1
The PIC Microcontrollers
  • The PIC microcontroller was designed by General
    Instruments
  • The PIC microcontroller is a complete computer
    contained within one chip
  • It contains the CPU, memory and IO devices all in
    one chip
  • The microcontroller contains many IO ports such
    as PORTA, B, C, D, E
  • It contains also timers, analog to digital
    converter, USART
  • This make this device an ideal solution for small
    project

1
2
MEMORY ORGANIZATION
  • There are three memory blocks in each of the
    PIC16F87A devices
  • The program memory
  • The data memory
  • Stack memory
  • The program memory and data memory have separate
    buses which allows concurrent access

2
3
Program Memory Organization
  • The PIC microcontroller contains many internal
    registers to control its operation
  • One of these registers is the program counter
  • The program counter is 13-bits wide in the
    16F877A microcontrollers
  • This limits the program memory space to 2138k
    words14 bits of flash program memory
  • When the microprocessor is first powered up it
    starts execution at memory location 0000H
  • When an interrupt occurs the microprocessor goes
    to memory location 0004H

3
4
(No Transcript)
5
Data Memory Organization
  • The data memory is partitioned into multiple
    banks which contains
  • The General Purpose Registers
  • The Special Function Registers

5
6
Data Memory Organization
  • A given bank is selected by bits RP1 (Statuslt6gt)
    and RP0 (Statuslt5gt) according to the table shown
    below
  • These two bits are located in the status register
    which is equivalent to the flag register found in
    the 8086

6
7
7
8
SPECIAL FUNCTION REGISTERS
  • The Special Function Registers are registers used
    by the CPU and peripheral modules for controlling
    the desired operation of the device
  • These registers are shown in the attached sheets
  • The most important registers will be discussed
    next

9
(No Transcript)
10
(No Transcript)
11
(No Transcript)
12
Status Register
  • The Status register contains the flag bits, reset
    status and the bank select bits for data memory

13
OPTION_REG Register
  • This register contains various control bits to
    configure
  • the TMR0 prescaler/WDT postscaler (single
    assignable
  • register known also as the prescaler), the
    external
  • INT interrupt, TMR0 and the weak pull-ups on PORTB

14
(No Transcript)
15
INTCON Register
  • This register is responsible controlling hardware
    interrupts
  • The GIE (bit 7) is responsible for enable or
    disable of all interrupts in the system
  • If GIE is 1 then all interrupts will be enabled
    otherwise all interrupts will be disabled
  • A complete description of these interrupts will
    be provided in the next slide

16
(No Transcript)
17
PIE1 Register
  • The PIE1 register contains the individual
    enable/disable bits for the peripheral interrupts
  • Peripherals are
  • the analog to digital converter
  • USART receiver
  • USART transmitter
  • Synchronous Serial Port
  • Timer1
  • Timer2

18
(No Transcript)
19
PIR1 Register
  • When an interrupt is generated, it is important
    to know which one of the above mentioned
    peripherals generates the interrupt
  • This can be done by inspecting the state of the
    PIR1 register which contains several flag bits
    corresponds to each peripheral
  • If an interrupt occurs, then the program can test
    the flags located in this register to determine
    which device generated the interrupt
  • A complete explanation for this register is
    provided in the next slide

20
(No Transcript)
21
PCON Register
  • The Power Control (PCON) register contains flag
    bits to allow differentiation between a Power-on
    Reset (POR), a Brown-out Reset (BOR), a Watchdog
    Reset (WDT) and an external MCLR Reset
About PowerShow.com