0% found this document useful (0 votes)
314 views14 pages

Overview of Special Function Registers

There are 21 special function registers (SFRs) that are each 1 byte in size and located in unique memory locations. The SFRs can be grouped into CPU registers like the A and B registers, status registers like the program status word register, pointer registers like the data pointer and stack pointer registers, I/O port latches, peripheral control registers, and peripheral data registers. The A register is used to hold data and results of arithmetic instructions while the B register is used for multiplication and division. The program status word register stores flag bits reflecting the CPU's current state. Timer/counter registers include the timer mode and timer control registers used for timer and counter functions. Port registers allow for input and output through ports 0

Uploaded by

kisha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
314 views14 pages

Overview of Special Function Registers

There are 21 special function registers (SFRs) that are each 1 byte in size and located in unique memory locations. The SFRs can be grouped into CPU registers like the A and B registers, status registers like the program status word register, pointer registers like the data pointer and stack pointer registers, I/O port latches, peripheral control registers, and peripheral data registers. The A register is used to hold data and results of arithmetic instructions while the B register is used for multiplication and division. The program status word register stores flag bits reflecting the CPU's current state. Timer/counter registers include the timer mode and timer control registers used for timer and counter functions. Port registers allow for input and output through ports 0

Uploaded by

kisha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Special Function Registers

(SFR’s)
Special Function Registers (SFR’s)

• 21 Special function registers (SFR) 


• There are 21 unique locations for these 21 special function
registers
• Each of these register is of 1 byte size. 
seven groups
• CPU Registers: A and B Register
• Status Register: PSW (Program Status Word) Register
• Pointer Registers: DPTR (Data Pointer – DPL, DPH) and SP (Stack
Pointer) Registers
• I/O Port Latches: P0 (Port 0), P1 (Port 1), P2 (Port 2) and P3 (Port 3)
Registers
• Peripheral Control Registers: PCON, SCON, TCON, TMOD, IE and
IP Registers
• Peripheral Data Registers: TL0, TH0, TL1, TH1 and SBUF Registers
Accumulator (A register):
• It is an 8-bit register.
• It holds a data and receives the result of the arithmetic instructions.
• Follows direct addressing approach.
• physical address is from E0H to E7H.
• A Register is both byte and bit addressable. 
• if you want to access the second bit (i.e bit 1), you may use E1H and for third bit
E2H and so on. 
B Register:
• It is 8-bit register.
• used for multiplication and division arithmetic operations.
• It is bit and byte-addressable register.
• It also follow direct addressing approach.
• Its physical address is from F0H to F7H
PSW (Program Status Word) Register:
• also called as Flag Register
• one of the important SFRs
• 8-bit register.
• consists of Flag Bits that reflect the current state of the CPU.
• both bit and byte addressable
• Consists of four conditional flags
• CY Carry
• AC Auxiliary Carry
• P parity
• OV overflow
Timer/Counter Registers:

• two 16-bit Programmable timers / counters (Timer 0 – Timer 1).


• Can be used as a timer – to generate time delay
• Or can be used as a counter to count events
• It has two special functions :
1. TMOD (Timer Mode Register)
2. TCON (Timer Control Register).
TMODE Registers:
• 8-bit register.
• Timer mode Register
• It consists of
• Gate
• C/T
• Mode selects
TCON Registers:

• Timer Control Register


•  an 8-bit register.
• Consists of
• (0,1) TF TR IE IT
SP (Stack Pointer)

• Stack is a portion of RAM to store temporary datas.


• SP -stack pointer register is used to access the stack
• The Sp
• It is 8 bit register
• It can take values from 00 to FFH
• Explain push and pop
• Push – stroe CPU reg data
• POP – Pop/delete Cpu reg data
DP (Data pointer register):

• 16-bit register 
• Used to store 16-bit address of data memory
• Can be used as two 8 bits DPH and DPL.
• Can be used as single 16bit register as DPTR
• 8 bit DP: Used to access internal RAM and SFR
• 16 bit DP : Used to access external data
Port Registers:

• 4 bidirectional I/O ports.


• Port 0, Port 1, Port 2 and Port 3 (P0, P1, P2 and P3)
• work as input or output port.
• Ports consists of Latches , Input buffer and output drivers
PC (program Counter):

• 16-bit register.
• use to hold the address of the memory location from where the next
instruction to be fetched.

You might also like