Bcd - Mitsubishi Electric melsec-k Programming Manual

Hide thumbs Also See for melsec-k:
Table of Contents

Advertisement

4-4-7. BCD
...
Conversion from BIN to BCD
/'
(Coding)
0
L D
XO
1
B C D
i
r>l
3 .
D2
c .
According to the table on the left
BCD $conversion
B C D , D i , D j +
D i +
U j
B C D , T
, D k +
T +
D k
B C D , C
, D k +
C +
I ) k
The data register contents are principally
binary
numbers,
but
after
BCD
conversim
,
the registers become Dj, Dk,
and the chntents are BCD.
The main application for BCD conversion is output to the outside as a decimal number
from
the
status in the register (binary number) via the output unit.
However, output 'is executed via the temporary storage D. register.
(1) The contents of C10 are output into Y50 to
5F
as a 4-digit BCD value.
(Coding)
0
L D
XOl
1
B C D
2
c 1 0
/
'
3
DO5
4
M O V
5
D O
5
6
K4
y 5 0
8
YSO
-
53
First BCD digit
Y54
-
5 7
Second BCD digit
Y58
-
s
B
Third BCD digit
Y5
C
-
5
E
Fourth BCD digit
Fig. 4-37. Application example for BCD instructions
-35-

Advertisement

Table of Contents
loading

Table of Contents