Decode 4 to 1 of 16 (dcd), Preface, Entering parameters – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual
Page 156: Updates to arithmetic status bits
![background image](/manuals/579919/156/background.png)
Preface
MicroLogix 1000 Programmable Controllers User Manual
9–8
Decode 4 to 1 of 16 (DCD)
When executed, this instruction sets one bit of the destination word. The particular
bit that is turned On depends on the value of the first four bits of the source word.
See the table below.
Use this instruction to multiplex data in applications such as rotary switches,
keypads, and bank switching.
Source
Destination
Bit 15–04 03 02 01 00 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
x 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
x 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
x 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
x 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
x 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
x 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
x 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
x 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
x 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
x 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
x 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
x 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
x 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
x 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Entering Parameters
•
Source is the address that contains the information to be decoded. Only the
first four bits (0–3) are used by the DCD instruction. The remaining bits may
be used for other application specific needs.
•
Destination is the address of the word where the decoded data is to be stored.
Updates to Arithmetic Status Bits
Unaffected.
Execution Times
(
µ
sec) when:
True
False
27.67
6.78
DCD
DECODE 4 to 1 of 16
Source
Dest