Saturday, February 27, 2016

8051 PSW Register

Program Status Register

  • Also knows as Flag Register
  • Address: 0xD0
  • Size: 8-bit.
  • Bit and Byte addressable.
  • Contains 6 flag bits and 2 user definable bits.
  • Flag bits indicate some conditions that resulted after an instruction was executed.

8051 PSW Register

BitDescription
PParity flag. Set/Cleared by hardware. This bit will set if Accumulator has odd number of 1’s after an operation. If not, the bit will remain cleared. It is used in serial port routines
--User definable flag
OVOverflow flag is set if there was an arithmetic overflow. For signed numbers, results greater than 127 or less than -128 will set OV flag. For unsigned numbers this can be ignored.
RS0Register bank select bit 0 (See below)
RS1Register bank select bit 1 (See below)
F0General purpose flag bit available for user
ACAuxiliary Carry Flag is set if carry was generated out of bit 3 in to bit 4 or if the result in the lower nibble is in the range of 0AH to 0FH. It is useful in arithmetic operations on BCD values.
CYCarry Flag is set if data is coming out of bit 7 of ACC during an arithmetic operation. It is also the Boolean accumulator. 1 bit register for Boolean instruction

RS1RS0Register Bank
000
011
102
113



Related topics:
8051 Registers   |   8051 Program Counter   |   8051 R Registers   |   8051 SFR   |   8051 P Registers   |   8051 Stack   |   8051 Stack Pointer   |   8051 Data Pointer   |   8051 PCON Register   |   8051 TCON Register   |   8051 TMOD Register   |   8051 Timer Registers   |   8051 SCON Register   |   8051 SBUF Register   |   8051 IE Register   |   8051 IP Register   |   8051 A Register   |   8051 B Register

List of topics: 8051

No comments:

Post a Comment