You are on page 1of 36

SKGDS

Introduction
Features of PIC 16F7X

High Performance RISC CPU


 High performance RISC CPU
 Only 35 single word instructions to learn
 All single cycle instructions except for program branches
which are two-cycle
 Operating speed: DC - 20 MHz clock input
DC - 200 ns instruction cycle
 Up to 8K x 14 words of FLASH Program Memory
 Up to 368 x 8 bytes of Data Memory (RAM)
Features of PIC 16F7X

High Performance RISC CPU


 Pin out compatible to the PIC16C73B/74B/76/77
 Pin out compatible to the PIC16F873/874/876/877
 Interrupt capability (up to 12 sources)
 Eight level deep hardware stack
 Direct, Indirect and Relative Addressing modes
 Processor read access to program memory
Features of PIC 16F7X

Peripheral Features
 Timer0: 8-bit timer/counter with 8-bit prescaler
 Timer1: 16-bit timer/counter with prescaler can be
incremented during SLEEP via external crystal/clock
 Timer2: 8-bit timer/counter with 8-bit period register,
prescaler and postscaler
 Two Capture, Compare, PWM modules
- Capture is 16-bit, max. resolution is 12.5 ns
- Compare is 16-bit, max. resolution is 200 ns
- PWM max. resolution is 10-bit
Features of PIC 16F7X

Peripheral Features
 8-bit, up to 8-channel Analog-to-Digital converter
 Synchronous Serial Port (SSP) with SPI (Master mode) and
I2C (Slave)
 Universal Synchronous Asynchronous Receiver & Transmitter
(USART/SCI)
 Parallel Slave Port (PSP), 8-bits wide with external RD, WR
and CS controls (40/44-pin only)
 Brown-out detection circuitry for Brown-out Reset (BOR)
Features of PIC 16F7X

Special Microcontroller Features


 Power-on Reset (POR)
 Power-up Timer (PWRT) and
 Oscillator Start-up Timer (OST)
 Watchdog Timer (WDT) with its own on-chip RC oscillator
for reliable operation
 Programmable code protection
 Power saving SLEEP mode
 Selectable oscillator options
 In-Circuit Serial Programming (ICSP) via two pins
Features of PIC 16F7X

CMOS Technology
 Low power, high speed CMOS FLASH
technology
 Fully static design

 Wide operating voltage range: 2.0V to 5.5V

 High Sink/Source Current: 25 mA

 Industrial temperature range


Features of PIC 16F7X

CMOS Technology
 Low power consumption:

< 2 mA typical @ 5V, 4 MHz


< 20 μA typical @ 3V, 32 kHz
< 1 μA typical standby current
Architecture of PIC 16F76
Architecture of PIC16F73 & PIC16F76
Architecture of PIC16F74 & PIC16F77
Pin Diagram of PIC 16F73/76
Pin Diagram of PIC 16F73/76
Pin Diagram of PIC 16F74/77
Memory Organization of PIC 16F8X

Program Memory
 Thirteen bit Program Counter
 Capable of addressing 8K
 Device has 8K Flash program memory
 Reset vector 0000
 Interrupt vector is at 0004h
Memory Organization of PIC 16F8X

Data Memory
 Partitioned into four banks
RP1 RP0 Bank
0 0 0
0 1 1
1 0 2
1 1 3

 Bits of RP1 & RP0 of the STATUS register selects the bank
access.
 It contains the General Purpose Registers & SFR
 It has 368 byte of Data Memory
 It has 256 byte of EEPROM
Memory Organization of PIC 16F8X

Stack
 It has an 8 level deep,
 13 bit wide stack Implemented as a circular buffer.
 The stack is neither readable nor writeable.
 The PC is pushed onto the stack when CALL occurs.
 PC is popped out of the stack if a return Ins. occurs
Memory Organization of PIC 16F7X
Register File Map of PIC 16F76/77
Register File Map of PIC 16F76/77
Registers of PIC 16F76/77

STATUS Register
The STATUS register contains the arithmetic status of the
ALU, the RESET status and the bank select bits for data
memory. The STATUS register can be the destination for any
instruction, as with any other register. If the STATUS register
is the destination for an instruction that affects the Z, DC, or C
bits, then the write to these three bits is disabled. These bits
are set or cleared according to the device logic. Furthermore,
the TO and PD bits are not writable, therefore, the result of an
instruction with the STATUS register as destination may be
different than intended.
Registers of PIC 16F76/77
Registers of PIC 16F76/77

OPTION_REG Register
The OPTION_REG register is a readable and writable register,
which 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.
Registers of PIC 16F76/77
Registers of PIC 16F76/77

INTCON Register
The INTCON register is a readable and writable register,
which contains various enable and flag bits for the TMR0
register overflow, RB Port change and External RB0/INT pin
interrupts.
Registers of PIC 16F76/77
Registers of PIC 16F76/77
Registers of PIC 16F76/77
Registers of PIC 16F76/77
Registers of PIC 16F76/77
INSTRUCTION SET

 Data Transfer group


 Arithmetic & Logic operation group
 Bit operation group
 Program flow control
 Other instructions
INSTRUCTION SET

 Data Transfer Group


 MOVLW Write constant in W register
 Syntax : Label MOVLW k
 Description : 8 bit constant is written in W reg.
 Operation : k to (W)
 Operand : 0 < k < 255
 No. of words : 1
 No. cycles : 1
 Flags : Nil

You might also like