TSC80251 TEMIC [TEMIC Semiconductors], TSC80251 Datasheet - Page 119
![no-image](/images/no-image-200.jpg)
TSC80251
Manufacturer Part Number
TSC80251
Description
Manufacturer
TEMIC [TEMIC Semiconductors]
Datasheet
1.TSC80251.pdf
(219 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
TSC80251G1D-16CB
Manufacturer:
TEXAS
Quantity:
769
Part Number:
TSC80251G1D-16CB
Manufacturer:
TEMIC
Quantity:
20 000
Part Number:
TSC80251G1D-16CB-E
Manufacturer:
TEMIC
Quantity:
20 000
Company:
Part Number:
TSC80251G1D-24CB
Manufacturer:
TEMIC
Quantity:
999
Company:
Part Number:
TSC80251G2D-16CB
Manufacturer:
TEMIC
Quantity:
1 715
Company:
Part Number:
TSC80251G2D-16CB
Manufacturer:
TEMIC
Quantity:
3 244
Part Number:
TSC80251G2D-24CB
Manufacturer:
TEMIC
Quantity:
20 000
TSC80251
DJNZ <byte>,<rel-addr>
Function:
Decrement and jump if not zero
Description:
Decrements the specified location by 1 and branches to the address specified by the second operand if the resulting
value is not zero. An original value of 00h underflows to 0FFh. The branch destination is computed by adding the signed
relative–displacement value in the last instruction byte to the PC, after incrementing the PC to the first byte of the
following instruction.
The location decremented may be a register or directly addressed byte.
Note :
When this instruction is used to modify an output Port, the value used as the original Port data is read from the output data latch, not the input
pins.
Example :
The on–chip RAM locations 40h, 50h, and 60h contain 01h, 70h, and 15h, respectively. After executing the following
instruction sequence:
on–chip RAM locations 40h, 50h, and 60h contain 00h, 6Fh, and 15h, respectively, and program execution continues
at label LABEL2. (The first jump was not taken because the result was zero.)
This instruction provides a simple way of executing a program loop a given number of times, or for adding a moderate
time delay (from 2 to 512 machine cycles) with a single instruction.
The instruction sequence,
TOGGLE :
toggles P1.7 eight times, causing four output pulses to appear at bit 7 of output Port 1. Each pulse lasts three states:
two for DJNZ and one to alter the pin.
DJNZ dir8,rel
[Encoding]
5.74
FLAGS :
Hex Code in:
Binary Mode = [Encoding]
Source Mode = [Encoding]
1101
DJNZ 40h,LABEL1
DJNZ 50h,LABEL2
DJNZ 60h,LABEL
CY
_
MOV
CPL
DJNZ
0101
R2, #8
P1.7
R2, TOGGLE
AC
_
addr7-addr0
OV
_
rel addr
Operation:
DJNZ
(PC)
(dir8)
IF [[(dir8) > 0] or [(dir8) < 0]]
THEN
(PC)
(PC) + 2
(PC) + rel
(dir8) - 1
N
Rev. C – May 7, 1999
Z