Professional Documents
Culture Documents
Architecture OF MC-1
Architecture OF MC-1
Architecture OF MC-1
Architecture-1
*
Contents
•Introduction
•Applications
•Microchip’s position
•Elements of Digital Controller
•Pin Diagram
•Internal architecture
•Simplified file register map
•I/O pin operation
•Core registers
Introduction
• The term PIC or Peripheral Interface
Controller, has been coined by Microchip
Technology Inc.
*
PIC Architecture: Background
• Company Philosophy
– Have products that fit the problem
– Many systems can be automated using 8-bit
microcontrollers
– Much of product line is 8-bit
*
Some typical applications
• Automotive air bag systems
• Remote control
• Handheld tools
• Appliances – coffee pot, mixer, stove,
refrigerator, dish washer, washer, dryer
• Major home systems – heating and cooling
• Cordless phones and cell phones
• Security systems
• TV, DVD player/recorder, DVR, PVR
• Sound system
*
Come in 4-bit through 32-bit
• 4-bit
– Very inexpensive
• 8-bit
– Still very cheap – often ~$1.00 per chip
• 16 and 32 bit
– Priced at $6.00 to 12.00 each
• Evaluation of requirements, chip capability,
and cost come into design decision
*
Typical automotive use
• Engine control – 32-bit microcontroller
– Fuel flow, fuel mixture, valve timing, throttle body
opening, spark timing
• Transmission control –16-bit microcontroller
• Audio system – 16-bit
• Antilock braking – 16-bit
• Up to fifty 8-bit microcontrollers for functions of
– Wiper control
– Electric Mirrors
– Air Bags
*
Automotive today continued
• Up to fifty 8-bit microcontrollers for functions of
– Wiper control
– Electric Mirrors
– Air Bags
– Fuel pump
– Speedometer
– Security system
– Climate control system
– Po er indo s …..
*
Microchip’s position
*
PIC architecture is a Har ard architecture
• The Harvard Architecture
*
Elements of a digital controller
Input Output
User input Peripherals CPU Peripherals User output
Central
Processing
ROM Unit RAM
Program Read Only Read & Write
download Memory Memory
Program address
EEPROM
Instruction MCU 256 bytes
Decode & control
CPU control lines
Ports, Timers
ADC, Serial I/O
Timing control
Clock Reset
Port A B C D E
*
PIC16F877 simplified file register map
Bank 0 (000 – 07F) Bank 1 (080 – 0FF) Bank 2 (100-180) Bank 3(180-1FF)
003h Status Reg 083h Status Reg 103h Status Reg 183h Status Reg
004h File Select 084h File Select 104h File Select 184h File Select
18FXXXX
<= 100 8 <= 128 KB 75 x 16 bits <= 16 High range, CAN, USB
J series 3V supply, C program
24FXXXX 76 x 24 bits
<= 100 16 <= 128 KB = 16 Power range, 3V supply, no EEPROM,
data RAM < 8 KB, C program
I/O pin operation
Output Output
CPU Data Bus
Data Current
Latch Driver
Write data bit
Input
Data
Read data bit Latch
Analogue input
multiplexer
PORT A
• Port A is 6 bit wide and bi-directional.
• Its corresponding data direction register is TRISA.
• If TRISA port pin is set to 1,corresponding port A pin will act
as an input pin and vice versa.
• Port A is used for analog inputs.
*
Port B
*
Port C
*
Port D
*
Port E
*
Machine Cycle
T1 T2 T3 T4
Clock
Read
Instruction
Decode
Instruction
Execute
Instruction
Store Result
*
Calculations