Electronic Circuits - Electronic Tutorials - Electronic Hobby Projects - A Complete Electronic Resource Centre

MICROCONTROLLER TUTORIALS - 8052

Videos

Products

Sitemap

Circuits

Tutorials

8051

Introduction

Chapter 1
Types of Memory

Chapter 2
Special Function Registers

Chapter 3
Basic Registers

Chapter 4
Addressing Modes

Chapter 5
Program Flow

Chapter 6
Low Level Information

Chapter 7
Timers

Chapter 8
Serial Port Operations

Chapter 9
Interrupts

Additional Features in 8052

8052 Instruction Set

8051 / 8052 Microcontroller
Instruction Set 
CJNE - Compare and Jump if not Equal

Operation: CJNE
Function: Compare and Jump If Not Equal
Syntax: CJNE operand1,operand2,reladdr

 

Instructions OpCode Bytes Cycles Flags
CJNE A,#data,reladdr 0xB4 3 2 C
CJNE A,iram addr,reladdr 0xB5 3 2 C
CJNE @R0,#data,reladdr 0xB6 3 2 C
CJNE @R1,#data,reladdr 0xB7 3 2 C
CJNE R0,#data,reladdr 0xB8 3 2 C
CJNE R1,#data,reladdr 0xB9 3 2 C
CJNE R2,#data,reladdr 0xBA 3 2 C
CJNE R3,#data,reladdr 0xBB 3 2 C
CJNE R4,#data,reladdr 0xBC 3 2 C
CJNE R5,#data,reladdr 0xBD 3 2 C
CJNE R6,#data,reladdr 0xBE 3 2 C
CJNE R7,#data,reladdr 0xBF 3 2 C

 

Description: CJNE compares the value of operand1 and operand2 and branches to the indicated relative address if operand1 and operand2 are not equal. If the two operands are equal program flow continues with the instruction following the CJNE instruction.

The Carry bit (C) is set if operand1 is less than operand2, otherwise it is cleared.

See Also: DJNZ, Instruction Set

 
  <<< Click here to come back on (8051 / 8052 - Instruction Set)
 

<<<<  Back to 8051 / 52  Microcontroller Tutorial