Digital Electronics - The 8051 Microcontroller - Discussion
Discussion Forum : The 8051 Microcontroller - General Questions (Q.No. 8)
8.
This statement will set the address of the bit to 1 (8051 Micro-controller):
SETB 01H
SETB 01H
Discussion:
26 comments Page 1 of 3.
Raja said:
1 decade ago
Now a days many companies write the program for development of embedded product in c language there are some micros available to write and read the bit.
Write=Set_Bit (Px, bit no) ; /* x=either 0 or 1 or 2or 3*/.
Read=Is_Bit_Set (Px, bitno) ;.
Write=Set_Bit (Px, bit no) ; /* x=either 0 or 1 or 2or 3*/.
Read=Is_Bit_Set (Px, bitno) ;.
Srinivas said:
1 decade ago
01h is byte address but setb is bit addressable instruction.
If you want to change the 01h data then you will use byte addressable instruction not use bit addressable instruction.
20h to 2fh have bit address so we will use this address.
If you want to change the 01h data then you will use byte addressable instruction not use bit addressable instruction.
20h to 2fh have bit address so we will use this address.
VEDI G said:
6 years ago
ANSWER IS WRONG.
Because bit addressable area having 16 bytes.
It means 128 bits address.
Bit address starting from 00h t0 7fh( 128bits in lower 128 bits).
Normally setb 01h means [20th byte second address 20h.1 ].
So answer is wrong.
Because bit addressable area having 16 bytes.
It means 128 bits address.
Bit address starting from 00h t0 7fh( 128bits in lower 128 bits).
Normally setb 01h means [20th byte second address 20h.1 ].
So answer is wrong.
Anonymous said:
10 years ago
SETB bit is used to set the indicated bit high. The bit can be carry or any directly addressable bit of a port, register, or RAM location. So it does not set the address of the bit high.
(2)
RUDRASENAREDDY said:
1 decade ago
In order to access the 128 bits of RAM location and other bit addressable space of 8051 individually, we can use single bit instruction such as SETB.
Sharanya said:
1 decade ago
As far as I know, SETB instruction is used only to set/reset the bit addressable registers and flag registers but never are used to set an address.
Anonymous said:
7 years ago
We can set the bits for only bank registers that is rs0 and rs1 to select the bank we can't set the bank by giving dierct address, .
Shruti said:
1 decade ago
SETB works only to set/reset(0 to 1 or 1 to 0) bit addresable
and flag registers..it cannot be used for set/reset of address
and flag registers..it cannot be used for set/reset of address
Niru said:
10 years ago
B. Because 20h to 2f only bit addressable and all ports.
Rest of the addresses cannot bit addressed.
Rest of the addresses cannot bit addressed.
(2)
Edison said:
1 decade ago
SETB instruction can be used in bit addressable memory location and bit operations.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers