
NXP Semiconductors
PT2001SWUG
PT2001 programming guide and instruction set
PT2001SWUG
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2019. All rights reserved.
User guide
Rev. 3.0 — 29 April 2019
75 / 153
ldcd
Description:
Loads one of the four end-of-count registers (eoc1, eoc2, eoc3, eoc4) with a value stored
in the 6-bit Data RAM address Dram and sets the outputs defined by the shortcut Sh1
and Sh2.
The operand Dram can be identified with a univocal label. The compiler automatically
substitutes the 'define' label (if used) with the suitable Data RAM address.
The Data RAM address is accessed according to the Boolean operand Ofs using the
Immediate addressing mode (IM), Indexed addressing mode (XM). In that case address
base is added to the address Dram. The address base is set using the stab instructions.
Assembler syntax:
ldcd Rst Ofs Sh1 Sh2 Dram Eoc;
Operands:
•
Rst – Operand (Boolean) defines if the selected counter value must be reset to zero or
must be unchanged.
Operand label
Operand description
_rst
The counter value is maintained, only the end-of-count is modified
rst
The counter value is reset to zero and start to count from zero
Ofs – Operands set Data RAM addressing mode
Operand label
Operand description
_ofs
Data RAM immediate addressing mode (IM)
ofs
Data RAM indexed addressing mode (XM)
Sh1, Sh2 – Operands set the first and second shortcuts related to the corresponding
outputs. The output shortcuts are defined using the dfsct instruction.
Operand label
Operand description
keep
No changes, maintains the previous setting
off
Shortcut (1 or 2) turns OFF
on
Shortcut (1 or 2) turns ON
toggle
Reverse the previous setting
Dram – Operand defines the 6-bit DRAM address
Eoc – Operand defines the end-of-count targeted among the four counters available.
Operand label
Operand description
c1
Register eoc1
c2
Register eoc2
c3
Register eoc3
c4
Register eoc4