476
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
• These instructions decode the data consisting of 0 to F specified by the lower 4 bits in the device specified by (s) to seven-
segment display data, and store the decoded data in the device specified by (d).
• In the case of a bit device, (d) indicates the start device for storing 7-segment display data. In the case of a word device, it
indicates the device number for storing the data.
Bit device
The data in Y48 to Y4F does not change until the next data is output.
Word device
• The following is the truth table for the seven-segment display.
(1) The upper 8 bits are filled with 0s.
(2) The seven-segment display data are stored in the lower 8 bits.
(s) Seven-segment
display
(d) Display data
Hexadecimal Bit pattern b7 b6 b5 b4 b3 b2 b1 b0
0 0000 00111111
1 0001 00000110
2 0010 01011011
3 0011 01001111
4 0100 01100110
5 0101 01101101
6 0110 01111101
7 0111 00100111
8 1000 01111111
9 1001 01101111
A 1010 01110111
B 1011 01111100
C 1100 00111001
D 1101 01011110
E 1110 01111001
F 1111 01110001
Y4F
00100111
Y48
K7 K2Y48SEG
b15
00000000
b8
00
1
00
111
b7 b0
K7 D8SEG
(1) (2)
b0
b1
b2
b3
b4
b5
b6