ADE7518
Mnemonic
JNC rel
JZ rel
JNZ rel
DJNZ Rn, rel
LJMP
LCALL addr16
JB bit, rel
JNB bit, rel
JBC bit, rel
CJNE A, dir, rel
CJNE A, #data, rel
CJNE Rn, #data, rel
CJNE @Ri, #data, rel
DJNZ dir, rel
Description
Jump on carry = 0
Jump on accumulator = 0
Jump on accumulator ≠ 0
Decrement register, JNZ relative
Long jump unconditional
Long jump to subroutine
Jump on direct bit = 1
Jump on direct bit = 0
Jump on direct bit = 1 and clear
Compare A, direct JNE relative
Compare A, immediate JNE relative
Compare register, immediate JNE relative
Compare indirect, immediate JNE relative
Decrement direct byte, JNZ relative
Bytes
2
2
2
2
3
3
3
3
3
3
3
3
3
3
Cycles
3
3
3
3
4
4
4
4
4
4
4
4
4
4
Miscellaneous
NOP
No operation
1
1
READ-MODIFY-WRITE INSTRUCTIONS
Some 8052 instructions read the latch and others read the pin.
The state of the pin is read for instructions that input a port bit.
Instructions that read the latch rather than the pin are the ones
that read a value, possibly change it, and rewrite it to the latch.
Because these instructions involve modifying the port, it is
assumed that the pin being modified is an output, so the output
state of the pin is read from the latch. This prevents a possible
misinterpretation of the voltage level of a pin. For example, if a
INSTRUCTIONS THAT AFFECT FLAGS
Many instructions explicitly modify the carry bit, such as the
MOV C bit and CLR C instructions. Other instructions that
affect status flags are listed in this section.
ADD A, Source
This instruction adds the source to the accumulator. No status
flags are referenced by the instruction.
Affected Status Flags
port pin is used to drive the base of a transistor, a 1 is written to
the bit to turn on the transistor. If the CPU reads the same port
bit at the pin rather than the latch, it reads the base voltage of
the transistor and interprets it as Logic 0. Reading the latch
rather than the pin returns the correct value of 1.
The instructions that read the latch rather than the pin are
called read-modify-write instructions and are listed in Table 55.
When the destination operand is a port or a port bit, these
instructions read the latch rather than the pin.
Table 55. Read-Modify-Write Instructions
C
OV
AC
Set if there is a carry out of Bit 7. Cleared otherwise.
Used to indicate an overflow if the operands are
unsigned.
Set if there is a carry out of Bit 6 or a carry out of
Bit 7, but not if both are set. Used to indicate an
overflow for signed addition. This flag is set if two
positive operands yield a negative result or if two
negative operands yield a positive result.
Set if there is a carry out of Bit 3. Cleared otherwise.
Instruction
ANL
ORL
XRL
JBC
Example
ANL P0, A
ORL P1, A
XRL P2, A
JBC P1.1, LABEL
Description
Logic AND.
Logic OR.
Logic XOR.
Jump if Bit = 1 and Clear Bit.
ADDC A, Source
This instruction adds the source and the carry bit to the accu-
mulator. The carry status flag is referenced by the instruction.
Affected Status Flags
CPL
INC
DEC
DJNZ
MOV PX.Y,C 1
CLR PX.Y 1
SETB PX.Y 1
CPL P2.0
INC P2
DEC P2
DJNZ P0, LABEL
MOV P0.0, C
CLR P0.0
SETB P0.0
Complement Bit.
Increment.
Decrement.
Decrement and Jump if Not Zero.
Move Carry to Bit Y of Port X.
Clear Bit Y of Port X.
Set Bit Y of Port X.
C
OV
Set if there is a carry out of Bit 7. Cleared otherwise.
Used to indicate an overflow if the operands are
unsigned.
Set if there is a carry out of Bit 6 or a carry out of Bit 7,
but not if both are set. Used to indicate an overflow
for signed addition. This flag is set if two positive
1
These instructions read the port byte (all eight bits), modify the addressed
bit, and write the new byte back to the latch.
AC
Rev. 0 | Page 71 of 128
operands yield a negative result or if two negative
operands yield a positive result.
Set if there is a carry out of Bit 3. Cleared otherwise.
相关PDF资料
ADE7569ASTZF16 IC ENERGY METER MCU 16K 64LQFP
ADE7752BARWZ-RL IC ENERGY METERING 3PHASE 24SOIC
ADE7755ARSZ IC ENERGY METERING 1PHASE 24SSOP
ADE7757ARNZRL IC ENERGY METERING 1PHASE 16SOIC
ADE7758ARWZRL IC ENERGY METERING 3PHASE 24SOIC
ADE7761AARSZ-RL IC ENERGY METERING 1PHASE 20SSOP
ADE7761BARSZ-RL IC ENERGY METERING 1PHASE 20SSOP
ADE7768ARZ-RL IC ENERGY METERING 1PHASE 16SOIC
相关代理商/技术参数
ADE7566 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF161 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC and LCD driver
ADE7566ACPZF162 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16-RL 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16-RL1 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC and LCD driver
ADE7566ACPZF16-RL12 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF8 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver