
5. FUNCTIONAL INSTRUCTIONS
B–61863E/15
PMC SEQUENCE PROGRAM
224
This instruction converts 1, 2, and 4–byte binary code into BCD code or
vice versa. To execute this instruction, you must preserve the necessary
number of bytes in the memory for the conversion result output data.
Fig.5.24.2 shows the expression format of DCNVB
DCNVB
(SUB 31)
CNV
f
Format
specifi–
cation
RST
ACT
W1
*
ffff
Input data
address
SIN
*
ffff
Conver–
sion result
output
address
Fig. 5.24.2 Expression format of DCNVB
(a) Sign of the data to be converted (SIN)
This parameter is significant only when you are converting BCD data
into binary coded data. It gives the sign of the BCD data.
Note that though it is insignificant when you are converting binary
into BCD data, you cannot omit it.
SIN=0 : Data (BCD code) to be input is positive.
SIN=1 : Data (BCD code) to be input is negative.
(b) Type of conversion (CNV)
CNV=0 : Convert binary data into BCD data
CNV=1 : Convert BCD data into binary data.
(c) Reset (RST)
RST=0 : Release reset
RST=1 : Reset error output W1. In other words, set W1=0.
(d) Execution command (ACT)
ACT=0 : Data is not converted. The value of W1 remains unchanged.
ACT=1 : Data is converted.
5.24
DCNVB (EXTENDED
DATA CONVERSION)
5.24.1
Function
5.24.2
Format
5.24.3
Control Conditions