which instruction is used to set a single bit of P2 material

which instruction is used to set a single bit of P2?( material: in the 8051trainer and 8051 keil assembler)

Solution

Ans) For accessing a port in single-bit manner, we use the syntax “SETB X. Y” where X is the port number 0, 1,2. or 3, and Y is the desired bit number from 0 to 7 for data bits DO to D7

Example, “SETB P2. 4 sets high bit 4 of port 2

So required instruction is \"SETB\"

which instruction is used to set a single bit of P2?( material: in the 8051trainer and 8051 keil assembler)SolutionAns) For accessing a port in single-bit manne

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site