16F84 MICROCHIP [Microchip Technology], 16F84 Datasheet - Page 57

no-image

16F84

Manufacturer Part Number
16F84
Description
18-pin Flash/EEPROM 8-Bit Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
BTFSS
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example
1998 Microchip Technology Inc.
If Skip:
Bit Test f, Skip if Set
[ label ] BTFSS f,b
0
0
skip if (f<b>) = 1
None
If bit 'b' in register 'f' is '0' then the next
instruction is executed.
If bit 'b' is '1', then the next instruction is
discarded and a NOP is executed
instead, making this a 2T
1
1(2)
Before Instruction
After Instruction
(2nd Cycle)
No-Operat
Decode
HERE
FALSE
TRUE
Q1
Q1
01
ion
f
b < 7
127
PC =
if FLAG<1> = 0,
PC =
if FLAG<1> = 1,
PC =
No-Operati
register 'f'
11bb
BTFSC
GOTO
Read
Q2
Q2
on
address HERE
address FALSE
address TRUE
FLAG,1
PROCESS_CODE
No-Opera
bfff
Process
data
Q3
Q3
tion
CY
instruction.
No-Operat
No-Operat
ffff
Q4
Q4
ion
ion
CALL
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example
2nd Cycle
1st Cycle
Call Subroutine
[ label ] CALL k
0
(PC)+ 1
k
(PCLATH<4:3>)
None
Call Subroutine. First, return address
(PC+1) is pushed onto the stack. The
eleven bit immediate address is loaded
into PC bits <10:0>. The upper bits of
the PC are loaded from PCLATH. CALL
is a two cycle instruction.
1
2
Before Instruction
After Instruction
No-Opera
Decode
HERE
Q1
tion
10
k
PC<10:0>,
2047
PC = Address HERE
PC = Address THERE
TOS = Address HERE+1
No-Opera
PIC16F8X
literal 'k',
Push PC
to Stack
0kkk
TOS,
CALL
Read
Q2
tion
DS30430C-page 57
No-Opera
THERE
Process
kkkk
PC<12:11>
data
Q3
tion
No-Operat
kkkk
Write to
Q4
PC
ion

Related parts for 16F84