EasyManuals Logo

Intel MCS 51 User Manual

Intel MCS 51
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #68 background imageLoading...
Page #68 background image
intelo
MCS@-51PROGRAMMER’SGUIDE AND INSTRUCTION SET
CPL A
Function:
Description:
Example:
Bytes:
Cycles:
Enooding:
Operation:
CPL bit
ComplementAccumulator
Eachbit ofthe Accumulatoris logicallycomplemented(one’scomplement).Bitswhichprevi-
ouslycontaineda oneare changedto a zero and vice-versa.No tlagsare affected.
The Accumulatorcontains5CH(O1O111CX3B).The instruction,
CPL A
willleavethe Accumulatorset to OA3H(101OOO11B).
1
1
1111
0100
CPL
(A) -1 (A)
Function:
Deeoription:
Example:
CPL C
Bytes:
Cycletx
Encoding:
Operation:
Complementbit
Thebit variablespecifiedis complemented.A bit whichhadbeena oneis changedto zeroand
vice-versa.No other flagsare affected.CLR can operateonthe carry or anydirectlyaddress-
ablebit.
Note:Whenthis instructionisusedto modifyan output pin,the valueusedas the originaldata
willbe read from the output data latch, not the input pin.
Port 1has previouslybeenwrittenwith 5BH(O1O1I1O1B).Theinstructionsequence,
CPL P1.1
CPL P1.2
willleavethe port set to 5BH(O1O11O11B).
1
1
I
1o11 0011
CPL
(c)+ 1 (c)
2-38

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel MCS 51 and is the answer not in the manual?

Intel MCS 51 Specifications

General IconGeneral
BrandIntel
ModelMCS 51
CategoryMicrocontrollers
LanguageEnglish

Related product manuals