Special Function Registers.

      Special function registers are upper RAM memory in the 8051 microcontrollers. These registers contain all peripheral related registers like P0, P1, P2, P3, timers or counters, serial port and interrupts-related registers. The SFR memory address starts from 80h to FFh. The SFR register is implemented by bit-address registers and byte-address registers.


                              Special Function Registers (SFR)
The accumulator and B registers and port registers all are bit addressable register remaining all are bye addressable registers.

Accumulator: 

  The accumulator which is also known as ACC or A is a bit as well as a byte-addressable register by an address of the accumulator. If you want to use a bit-addressable register, you can use a single bit (E0) of the register and you can use an 8-bit of the accumulator as a byte-addressable register. The accumulator holds the results of most Arithmetic and logical operations.


                               Accumulator register

B-Register
The B-register is a bit and byte-addressable register. You can access 1-bit or all 8-bits by a physical address F0h. Suppose to access a bit 1, we have to use f1. The B register is only used for multiplication and division operations.
B-Register

Port Registers
          The 8051 microcontroller consists of 4-input and output ports (P0, P1, P2, and P3) or 32-I/O pins. Each pin is designed with a transistor and P registers. The pin configuration is very important for a microcontroller that depends on the logic states of the registers. The pin configuration as input given by 1 or output 0 depends on the logic states. If logic 1 is applied to the bit of the P register, the output transistor switches off the appropriate pin that acts as an input pin.

         Port Registers of 8051

Counters and registers:
      Many microcontrollers consist of one or more timers and counters. The timers are used to generate precious time delay and the source for the timers is a crystal oscillator. The counters are used to count the number of external events – for instance, the objective counter, and the source for counters are external pulses applied across the counter pin.
The 8051 microcontroller consists of two 16-bit timers and counters such as timer 0 and timer 1. Both the timers consist of a 16-bit register in which the lower byte is stored in the TL and the higher byte is stored in the TH. The Timer can be used as a counter as well as for timing operation that depends on the source of the clock pulses to the counters.
The Counters and Timers in 8051 microcontrollers contain two special function registers: TMOD (Timer Mode Register) and TCON (Timer Control Register), which are used for activating and configuring timers and counters.





Comments

Popular posts from this blog

General puprose registers in 8051.

TCON Special Function register.

TMOD Special Function Register.