UPSD3254 STMICROELECTRONICS [STMicroelectronics], UPSD3254 Datasheet - Page 23

no-image

UPSD3254

Manufacturer Part Number
UPSD3254
Description
Flash Programmable System Devices with 8032 Microcontroller Core
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
UPSD3254A-24U6
Manufacturer:
ST
0
Part Number:
UPSD3254A-40T6
Manufacturer:
STMicroelectronics
Quantity:
10 000
Part Number:
UPSD3254A-40U6
Manufacturer:
STMicroelectronics
Quantity:
10 000
Part Number:
UPSD3254A-40U6
Manufacturer:
ST
Quantity:
20 000
Part Number:
UPSD3254B-24U6
Manufacturer:
ST
0
Part Number:
UPSD3254BV-24U6
Manufacturer:
ST
Quantity:
3 100
Part Number:
UPSD3254BV-24U6
Manufacturer:
ST
Quantity:
875
Part Number:
UPSD3254BV-24U6
Manufacturer:
STMicroelectronics
Quantity:
10 000
Part Number:
UPSD3254BV-24U6
Manufacturer:
ST
Quantity:
20 000
Part Number:
UPSD3254BV-40U6
Manufacturer:
ST
Quantity:
200
Table 4. Arithmetic Instructions
Logical Instructions
Table 5, page 24 shows list of uPSD325X devices
logical instructions. The instructions that perform
Boolean operations (AND, OR, Exclusive OR,
NOT) on bytes perform the operation on a bit-by-
bit basis. That is, if the Accumulator contains
00110101B and byte contains 01010011B, then:
will leave the Accumulator holding 00010001B.
The addressing modes that can be used to access
the <byte> operand are listed in Table 5.
The ANL A, <byte> instruction may take any of the
forms:
Note: Boolean operations can be performed on
any byte in the internal Data Memory space with-
out going through the Accumulator. The XRL
<byte>, #data instruction, for example, offers a
quick and easy way to invert port bits, as in
ANL A, <byte>
ANL A,7FH(direct addressing)
ANL A, @R1 (indirect addressing)
ANL A,R6 (register addressing)
ANL A,#53H (immediate constant)
XRL P1, #0FFH.
ADDC A,<byte>
SUBB A,<byte>
ADD A,<byte>
DEC <byte>
INC <byte>
Mnemonic
INC DPTR
MUL AB
DIV AB
DA A
DEC
INC
<byte> = <byte> + 1
<byte> = <byte> – 1
A = A + <byte> + C
A = A – <byte> – C
DPTR = DPTR + 1
B = Mod[ A / B ]
A = A + <byte>
Decimal Adjust
A = Int[ A / B ]
B:A = B x A
Operation
A = A + 1
A = A – 1
UPSD3254A, UPSD3254BV, UPSD3253B, UPSD3253BV
If the operation is in response to an interrupt, not
using the Accumulator saves the time and effort to
push it onto the stack in the service routine.
The Rotate instructions (RL A, RLC A, etc.) shift
the Accumulator 1 bit to the left or right. For a left
rotation, the MSB rolls into the LSB position. For a
right rotation, the LSB rolls into the MSB position.
The SWAP A instruction interchanges the high
and low nibbles within the Accumulator. This is a
useful operation in BCD manipulations. For exam-
ple, if the Accumulator contains a binary number
which is known to be less than 100, it can be quick-
ly converted to BCD by the following code:
Dividing the number by 10 leaves the tens digit in
the low nibble of the Accumulator, and the ones
digit in the B register. The SWAP and ADD instruc-
tions move the tens digit to the high nibble of the
Accumulator, and the ones digit to the low nibble.
MOVE B,#10
DIV AB
SWAP A
ADD A,B
Dir.
X
X
X
X
X
Accumulator and B only
Accumulator and B only
Addressing Modes
Ind.
Accumulator only
Data Pointer only
Accumulator only
Accumulator only
X
X
X
X
X
Reg.
X
X
X
X
X
Imm
X
X
X
23/175

Related parts for UPSD3254