DL205 User Manual, 4th Edition, Rev. B
5–140
Chapter 5: Standard RLL Instructions - Number Conversion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Segment (SEG)
The BCD / Segment instruction converts a four digit HEX
value in the accumulator to seven segment display format.
The result resides in the accumulator.
In the following example, when X1 is on, the value in V1400 is loaded into the lower 16 bits
of the accumulator using the Load instruction. The binary (HEX) value in the accumulator is
converted to seven segment format using the Segment instruction. The bit pattern in the
accumulator is copied to Y20–Y57 using the Out Formatted instruction.
SEG
ý
ý
þ
þ
230
240
2
5
0
-1
2
6
0
-- g f
e d c b a
-- g f
e d c b a
-- g f
e d c b a
SEG
X1
Convert the binary (HEX)
value in the accumulator to
seven segment display
format
OUTF
Y20
K32
Copy the value in the
accumulator to Y20--Y57
LD
V1400
Load the value in V1400 nto the
lower 16 bits of the accumulator
0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
6 F 7 1
V1400
0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0
0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Y20
Y21
Y22
Y23
OFF
ON
ON
OFF
Y24
OFF
Y53
Y54
Y55
Y56
ON
ON
ON
ON
Y57
OFF
-- g f
e d c b a Segment
Labels
a
g
f
e
d
c
b
Segment
Labels
Handheld Programmer Keystrokes
STR
$
ANDST
L
3
D
SHFT
1
B
ENT
2
C
0
A
4
E
RST
S
3
D
ENT
6
G
5
F
ENT
1
B
4
E
0
A
0
A
SHFT
OUT
GX
SHFT
2
C
ENT
Direct
SOFT
DS
Used
HPP Used