Computer Hardware User Manual

337
Do not set C to values other than 000 to 007.
Overview When the execution condition is OFF, 7SEG(––) is not executed. When the
execution condition is ON, 7SEG(––) reads the source data (either 4 or 8-digit),
converts it to 7-segment display data, and outputs that data to the 7-segment
display connected to the output indicated by O.
The value of C indicates the number of digits of source data and the logic for the
Input and Output Units, as shown in the following table.
Source data Displays data input logic Displays latch input logic C
4 digits (S) Same as Output Unit
Same as Output Unit 000
Different from Output Unit 001
Different from Output Unit
Same as Output Unit 002
Different from Output Unit 003
8 digits Same as Output Unit
Same as Output Unit 004
(S, S+1)
Different from Output Unit 005
Different from Output Unit
Same as Output Unit 006
Different from Output Unit 007
If there are 8 digits of source data, they are placed in S and S+1, with the most
significant digits placed in S+1. If there are 4 digits of source data, they are
placed in S.
7SEG(––) displays the 4 or 8-digit data in 12 cycles, and then starts over and
continues displaying the data.
The 7-segment display must provide four data lines and one latch signal line for
each display digit.
Note 1. Consider the cycle time and the characteristics of the 7-segment display
when designing the system.
2. Output bits not used here can be used as ordinary output bits.
Precautions I/O refreshing must be performed for all I/O points used by 7SEG(––) each time it
is executed to ensure effective operation. The I/O REFRESH instruction must
thus be used with 7SEG(––) whenever 7SEG(––) is used in a subroutine to en-
sure that the I/O points are refreshed each execution. Refer to page 350 for an
example of this type of programming.
7SEG(––) will be executed from the first cycle whenever program execution is
started, including restarts made after power interruptions.
Do not use 7SEG(––) more than twice in the program.
7SEG(––) cannot be used for I/O Units mounted to Slave Racks.
Hardware This instruction outputs word data to a 7-segment display. It utilizes either 8 out-
put bits for 4 digits or 12 output bits for 8 digits. The 7-segment display is con-
nected to an Output Unit as shown in the diagram below. For 4-digit display, the
data outputs (D0 to D3) are connected to output points 0 through 3 (allocated
word O), and latch outputs (CS0 to CS3) are connected to output points 4
through 7. Output point 12 (for 8-digit display) or output point 8 (for 4-digit dis-
Advanced I/O Instructions Section 5-28