Make a list of commonly used registers in 8051 and discuss t

Make a list of commonly used registers in 8051 and discuss the special features of the accumulator (A). Explain the function of each bit of program status word register.

Solution

The commonly used registers in 8051 Microprocessor are:

Special features of an Accumulator:

Accumulator is a register that holds 8 bit data. The data to be processed by arithmetic and logic unit and their results are stored in accumulator. It is also used to send or receive data from intrenal data bus.

Program status word register:

This register is an 8 bit register also referred as flag register. Even though it has 8 bits, only 6 bits are used and the other two bits remain unused. Four flags are called conditional flags which indicate few conditions that result after the execution of an instruction. They are carry, auxillary carry, parity and overflow. The other two are RS0 and RS1 which are register selection bits.

The empty block bits can be used by the programmer for any purpose.

Carry: This flag is set when carry is there from D7 and is affected after the addition or subtraction of 8 bit data.

Auxillary Carry: This flag is set when there is a carry from D3 and D4 while Add and Sub operations else it is cleared.

Parity: This indicates the number of 1s in the accumulator register. If there are even number of 1s then P=0 and if odd P=1.

Overflow: This flag is set when the result is too large.

Carry Auxillary Carry    RS1 RS0 Overflow    P   
 Make a list of commonly used registers in 8051 and discuss the special features of the accumulator (A). Explain the function of each bit of program status word

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site