SPECIAL FUNCTION REGISTERS (SFR) OF 8051/8031 MICROCONTROLLER

•    The SFRs include 21 internal registers listed in table.
•    Each register of SFR has one byte address. Some of the registers are both byte and bit addressable (The registers whose address ends with 0H or 8H are bit addressable).
•    The 8031/8051 has a separate 256 bytes internal RAM accessed by using 8-bit address.
•    In this 256 bytes address space, first 128 byte addresses are allotted to internal RAM (00H to 7FH) and the next 128 bytes are allotted to SFR (80H to FFH).
•    Using MOV instructions SFR can access.



A and B Registers:

•    The A and B registers are called CPU registers.

•    They are used to hold the data for most of the CPU (ALU) operations.

•    The size of A and B registers are 8-bit.

•    In ALU operation, the result is stored in A-register and so it is also known as accumulator.


Data Pointer (DPTR):

•    The data pointer is a 16-bit register used to hold the 16-bit address of data memory.

•    This can also be used as two numbers of 8-bit data pointer namely DPH and DPL.

•    The 8-bit data pointers are used for accessing internal RAM and SFR.

•    The 16-bit data pointer is used for accessing external data memory.

•    The contents of data pointer are programmable using instructions.

Program Status Word (PSW):


•    The PSW is also known as flag register.

•    The flags are useful for the programmer to test the condition of the result and make decisions.

•    The format of PSW of 8031/8051 microcontroller is shown in fig.






•    The PSW consists of four math flags and two register bank select bits. The math flags are Carry, Auxiliary Carry, and Overflow and Parity flags.

•    The flags are altered after arithmetic and logical operations depending on the result.

•    The carry flag is set when the result has a carry.

•    When there is a carry from lower nibble to upper nibble the auxiliary carry is set.

•    When the result has even parity, the parity flag is set.

•    In certain mathematical operations if the size of the result exceeds the size of destination register then overflow flag is set.

•    The register bank select bits RS1 and RS0 are used to select any one of the four register banks of the internal RAM. At any one time the microcontroller can work with (or access) only one register bank selected by these bits.

•    The bank select bits are programmable and after reset the controller defaults to bank-0. The selection of register bank using the RS1 and RS0 bits are listed in table.


Stack Pointer (SP):
•    The stack pointer always holds the 8-bit address of the top of stack.
•    The programmer can reserve any portion of RAM as stack.
•    After a reset the stack pointer is initialized to 07H.
•    The stack can be accessed using PUSH and POP instructions.
•    During PUSH operation the stack pointer is automatically incremented by one and during POP operation the stack pointer is automatically decremented by one.

Power Control Register (PCON):
•    The PCON register is used for power control and baud rate selection.
•    It also consists of general-purpose user flags. The format of PCON is shown in figure.
•    The controller can be driven to idle mode by setting IDL bit of PCON register.
•    In idle mode the clock signal is stopped to CPU(ALU), but the clock signal is supplied to interrupt, timer and serial port blocks.
•    The idle mode can be terminated either by an interrupt or by hardware reset.
•    The power 12V can be reduced to 2V by setting PD bit.
•    During power down mode the internal oscillator is stopped.


•    The power down mode can be terminated only by a hardware reset.

•    The SMOD bit is used to decide the baud rate in serial port operating modes 1, 2 or 3.

•    In mode 2,

if SMOD =0, then the baud rate is 1/64 of oscillator frequency

if SMOD = 1, then the baud rate is 1/32 of oscillator frequency.

•    In mode 1 and 3, the baud rate depends on SMOD and timer-1 overflow rate.

The baud rate in mode 1 or 3 = (2SMOD/32) x (Timer-1 Overflow Rate).

•    The programmer, to indicate the status of certain events during program execution can use the general-purpose flag bits GF1 and GF.

Serial Data Buffer Register (SBUF):

•    The SBUF register is used to hold the parallel data during transmission and reception.

•    During serial reception, the serial data is received via RxD pin and converted to parallel data and stored in receive buffer.

•    During serial transmission, the parallel data is stored in transmit buffer and then converted to serial data to transmit via TxD pin.

•    The transmit and receive buffers are assigned the same internal address 99H but transmit buffer can be accessed only for write operation and receive buffer can be accessed only for read operation.

•    When data is written to SBUF if goes to transmit buffer and when data is read from SBUF it comes from receive buffer.

No comments:

Post a Comment

Labels

PROJECTS 8086 PIN CONFIGURATION 80X86 PROCESSORS TRANSDUCERS 8086 – ARCHITECTURE Hall-Effect Transducers INTEL 8085 OPTICAL MATERIALS BIPOLAR TRANSISTORS INTEL 8255 Optoelectronic Devices Thermistors thevenin's theorem MAXIMUM MODE CONFIGURATION OF 8086 SYSTEM ASSEMBLY LANGUAGE PROGRAMME OF 80X86 PROCESSORS POWER PLANT ENGINEERING PRIME MOVERS 8279 with 8085 MINIMUM MODE CONFIGURATION OF 8086 SYSTEM MISCELLANEOUS DEVICES MODERN ENGINEERING MATERIALS 8085 Processor- Q and A-1 BASIC CONCEPTS OF FLUID MECHANICS OSCILLATORS 8085 Processor- Q and A-2 Features of 8086 PUMPS AND TURBINES 8031/8051 MICROCONTROLLER Chemfet Transducers DIODES FIRST LAW OF THERMODYNAMICS METHOD OF STATEMENTS 8279 with 8086 HIGH VOLTAGE ENGINEERING OVERVOLATGES AND INSULATION COORDINATION Thermocouples 8251A to 8086 ARCHITECTURE OF 8031/8051 Angle-Beam Transducers DATA TRANSFER INSTRUCTIONS IN 8051/8031 INSTRUCTION SET FOR 8051/8031 INTEL 8279 KEYBOARD AND DISPLAY INTERFACES USING 8279 LOGICAL INSTRUCTIONS FOR 8051/8031 Photonic Transducers TECHNOLOGICAL TIPS THREE POINT STARTER 8257 with 8085 ARITHMETIC INSTRUCTIONS IN 8051/8031 LIGHTNING PHENOMENA Photoelectric Detectors Physical Strain Gage Transducers 8259 PROCESSOR APPLICATIONS OF HALL EFFECT BRANCHING INSTRUCTIONS FOR 8051/8031 CPU OF 8031/8051 Capacitive Transducers DECODER Electromagnetic Transducer Hall voltage INTEL 8051 MICROCONTROLLER INTEL 8251A Insulation Resistance Test PINS AND SIGNALS OF 8031/8051 Physical Transducers Resistive Transducer STARTERS Thermocouple Vacuum Gages USART-INTEL 8251A APPLICATIONs OF 8085 MICROPROCESSOR CAPACITANCE Data Transfer Instructions In 8086 Processors EARTH FAULT RELAY ELECTRIC MOTORS ELECTRICAL AND ELECTRONIC INSTRUMENTS ELECTRICAL BREAKDOWN IN GASES FIELD EFFECT TRANSISTOR (FET) INTEL 8257 IONIZATION AND DECAY PROCESSES Inductive Transducers Microprocessor and Microcontroller OVER CURRENT RELAY OVER CURRENT RELAY TESTING METHODS PhotoConductive Detectors PhotoVoltaic Detectors Registers Of 8051/8031 Microcontroller Testing Methods ADC INTERFACE AMPLIFIERS APPLICATIONS OF 8259 EARTH ELECTRODE RESISTANCE MEASUREMENT TESTING METHODS EARTH FAULT RELAY TESTING METHODS Electricity Ferrodynamic Wattmeter Fiber-Optic Transducers IC TESTER IC TESTER part-2 INTERRUPTS Intravascular imaging transducer LIGHTNING ARRESTERS MEASUREMENT SYSTEM Mechanical imaging transducers Mesh Current-2 Millman's Theorem NEGATIVE FEEDBACK Norton's Polarity Test Potentiometric transducers Ratio Test SERIAL DATA COMMUNICATION SFR OF 8051/8031 SOLIDS AND LIQUIDS Speed Control System 8085 Stepper Motor Control System Winding Resistance Test 20 MVA 6-digits 6-digits 7-segment LEDs 7-segment A-to-D A/D ADC ADVANTAGES OF CORONA ALTERNATOR BY POTIER & ASA METHOD ANALOG TO DIGITAL CONVERTER AUXILIARY TRANSFORMER AUXILIARY TRANSFORMER TESTING AUXILIARY TRANSFORMER TESTING METHODS Analog Devices A–D BERNOULLI’S PRINCIPLE BUS BAR BUS BAR TESTING Basic measuring circuits Bernoulli's Equation Bit Manipulation Instruction Buchholz relay test CORONA POWER LOSS CURRENT TRANSFORMER CURRENT TRANSFORMER TESTING Contact resistance test Current to voltage converter DAC INTERFACE DESCRIBE MULTIPLY-EXCITED Digital Storage Oscilloscope Display Driver Circuit E PROMER ELPLUS NT-111 EPROM AND STATIC RAM EXCITED MAGNETIC FIELD Electrical Machines II- Exp NO.1 Energy Meters FACTORS AFFECTING CORONA FLIP FLOPS Fluid Dynamics and Bernoulli's Equation Fluorescence Chemical Transducers Foil Strain Gages HALL EFFECT HIGH VOLTAGE ENGG HV test HYSTERESIS MOTOR Hall co-efficient Hall voltage and Hall Co-efficient High Voltage Insulator Coating Hot-wire anemometer How to Read a Capacitor? IC TESTER part-1 INSTRUMENT TRANSFORMERS Importance of Hall Effect Insulation resistance check Insulator Coating Knee point Test LEDs LEDs Display Driver LEDs Display Driver Circuit LM35 LOGIC CONTROLLER LPT LPT PORT LPT PORT EXPANDER LPT PORT LPT PORT EXTENDER Life Gone? MAGNETIC FIELD MAGNETIC FIELD SYSTEMS METHOD OF STATEMENT FOR TRANSFORMER STABILITY TEST METHODS OF REDUCING CORONA EFFECT MULTIPLY-EXCITED MULTIPLY-EXCITED MAGNETIC FIELD SYSTEMS Mesh Current Mesh Current-1 Moving Iron Instruments Multiplexing Network Theorems Node Voltage Method On-No Load And On Load Condition PLC PORT EXTENDER POTIER & ASA METHOD POWER TRANSFORMER POWER TRANSFORMER TESTING POWER TRANSFORMER TESTING METHODS PROGRAMMABLE LOGIC PROGRAMMABLE LOGIC CONTROLLER Parallel Port EXPANDER Paschen's law Piezoelectric Wave-Propagation Transducers Potential Transformer RADIO INTERFERENCE RECTIFIERS REGULATION OF ALTERNATOR REGULATION OF THREE PHASE ALTERNATOR Read a Capacitor SINGLY-EXCITED SOLIDS AND LIQUIDS Classical gas laws Secondary effects Semiconductor strain gages Speaker Driver Strain Gages Streamer theory Superposition Superposition theorem Swinburne’s Test TMOD TRANSFORMER TESTING METHODS Tape Recorder Three-Phase Wattmeter Transformer Tap Changer Transformer Testing Vector group test Virus Activity Voltage Insulator Coating Voltage To Frequency Converter Voltage to current converter What is analog-to-digital conversion Windows work for Nokia capacitor labels excitation current test magnetic balance voltage to frequency converter wiki electronic frequency converter testing voltage with a multimeter 50 hz voltages voltmeter

Search More Posts

Followers