0
96kviews
Explain program status register of 8051 microcontroller?
1 Answer
written 7.8 years ago by |
The program status word (PSW) register is an 8-bit register, it is also referred to as the flag register the PSW register is 8-bit wide only 6-bit of it are used by the 8051, the two unused bits are user definable flags, four of the flags are called conditional flags, meaning that they indicate some conditions that results after an instruction is executed, these four are CY(carry), AC(auxiliary carry), P(parity) and OV(overflow) the bits PSW.3 and PSW.4 are designated as RS0 and RS1 register selection bit and are used to change the bank register.
RS 1 | RS 0 | Register Bank |
---|---|---|
1 | 0 | Register bank 0 |
0 | 1 | Register bank 1 |
1 | 0 | Register bank 2 |
1 | 1 | Register bank 3 |
CY (carry flag):
AC(Auxiliary flag):
P (parity flag):
OV (overflow flag):