UPSD3233 STMicroelectronics, UPSD3233 Datasheet - Page 26

no-image

UPSD3233

Manufacturer Part Number
UPSD3233
Description
Flash Programmable System Devices with 8032 Microcontroller Core
Manufacturer
STMicroelectronics
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
UPSD3233
Manufacturer:
ST
0
Part Number:
UPSD3233A-40T6
Manufacturer:
ST
0
Part Number:
UPSD3233A-40U6
Manufacturer:
ST
0
Part Number:
UPSD3233B
Manufacturer:
ST
0
Part Number:
UPSD3233B-24T6
Manufacturer:
ST
0
Part Number:
UPSD3233B-40T6
Manufacturer:
ST
Quantity:
5 530
Part Number:
UPSD3233B-40T6
Manufacturer:
ST
Quantity:
586
Part Number:
UPSD3233B-40T6
Manufacturer:
ST
Quantity:
20 000
Part Number:
UPSD3233B-40U6
Manufacturer:
COSEL
Quantity:
100
Part Number:
UPSD3233B-40U6
Manufacturer:
ST
Quantity:
20 000
Part Number:
UPSD3233BV-24T6
Manufacturer:
ST
Quantity:
200
UPSD3234A, UPSD3234BV, UPSD3233B, UPSD3233BV
First, pointers R1 and R0 are set up to point to the
two bytes containing the last four BCD digits. Then
a loop is executed which leaves the last byte, loca-
tion 2EH, holding the last two digits of the shifted
number. The pointers are decremented, and the
loop is repeated for location 2DH. The CJNE in-
struction (Compare and Jump if Not equal) is a
loop control that will be described later. The loop
executed from LOOP to CJNE for R1 = 2EH, 2DH,
2CH, and 2BH. At that point the digit that was orig-
inally shifted out on the right has propagated to lo-
cation 2AH. Since that location should be left with
0s, the lost digit is moved to the Accumulator.
Table 9. Shifting a BCD Number One Digit to the Right
26/175
LOOP:
MOV
MOV
; loop for R1 = 2Eh
MOV
XCHD
SWAP
MOV
DEC
DEC
CNJE
; loop for R1 = 2Dh
; loop for R1 = 2Ch
; loop for R1 = 2Bh
CLR
XCH
R1,#2Eh
R0,#2Dh
A,@R1
A,@R0
A
@R1,A
R1
R0
R1,#2Ah,LOOP
A
A,2Ah
2A
00
00
00
00
00
00
00
00
00
00
00
08
08
00
Table 7. Shifting a BCD Number Two Digits to
the Right (using direct MOVs: 14 bytes)
Table 8. Shifting a BCD Number Two Digits to
the Right (using direct XCHs: 9 bytes)
MOV A,2Eh
MOV 2Eh,2Dh
MOV 2Dh,2Ch
MOV 2Ch,2Bh
MOV 2Bh,#0
CLR
XCH
XCH
XCH
XCH
A
A,2Bh
A,2Ch
A,2Dh
A,2Eh
2B
12
12
12
12
12
12
12
12
12
12
18
01
01
01
2C
34
34
34
34
34
34
34
34
34
38
23
23
23
23
2A
2A
00
00
00
00
00
00
00
00
00
00
2B
12
12
12
12
00
2B
12
00
00
00
00
2D
56
56
56
58
58
58
58
58
58
45
45
45
45
45
2C
34
34
34
12
12
2C
34
34
12
12
12
2D
56
56
34
34
34
2D
56
56
56
34
34
2E
78
78
78
78
78
67
67
67
67
67
67
67
67
67
2E
78
56
56
56
56
2E
78
78
78
78
56
ACC
78
76
67
67
67
67
67
45
23
01
00
08
ACC
xx
xx
ACC
78
78
78
78
78
00
12
34
56
78

Related parts for UPSD3233