Wednesday, March 23, 2016

8051 Set Bit

Set Bit
SETB sets the indicated bit to one. SETB can operate on the carry flag or any directly addressable bit. No other flags are affected.

SETB C
Encoding: 1 1 0 1 0 0 1 1

SETB bit
Encoding: 1 1 0 1 0 0 1 0 bit address

The carry flag is cleared. Output Port 1 has been written with the value 34H (00110100B). The following instructions,

SETB C
SETB P1.0

sets the carry flag to 1 and changes the data output on Port 1 to 35H (00110101B).



Related topics:
8051 Complement Accumulator and Bit   |   8051 Clear Accumulator and Bit   |   8051 Rotate Accumulator   |   8051 Swap Nibble   |   8051 Exchange Accumulator   |   8051 Exchange Digit   |   8051 Push and Pop   |   8051 No Operation

List of topics: 8051

No comments:

Post a Comment