DOCA0275EN-00

Latch Logic Commands

Overview

The custom logic editor uses the following latch commands:

  • LATCH

  • LATCH_NV

LATCH

The LATCH command:

  • Stores a Boolean value (0 or 1) in a temporary register

  • Provides a method for setting and resetting the stored value

  • Saves the clear and set status from the previous scan

Arguments

Representation

1

LATCH TmpReg

Input Argument

Type

Bit

Description

TmpReg

UINT

Bit1

Sets the TmpReg.Bit0 to 1 on a rising edge

Bit2

Resets the TmpReg.Bit1 to 0 on a falling edge

Output Argument

Type

Bit

Description

TmpReg

UINT

Bit0

State of the latch

Bit3

TmpReg.Bit1 history bit

Bit4

TmpReg.Bit2 history bit

LATCH_NV

The LATCH_NV command:

  • Stores a Boolean value (0 or 1) in a non-volatile register

  • Provides a method for setting and resetting the stored value

  • Saves the clear and set status from the previous scan

Use the LATCH_NV command, instead of the LATCH command, to retain the latch state during a power cycle.

Arguments

Representation

1

LATCH_NV NVReg

Input Argument

Type

Bit

Description

NVReg

UINT

Bit1

Sets the TmpReg.Bit0 to 1 on a rising edge

Bit2

Resets the TmpReg.Bit0 to 0 on a rising edge

Output Argument

Type

Bit

Description

NVReg

UINT

Bit0

State of the latch

Bit3

TmpReg.Bit1 history bit

Bit4

TmpReg.Bit2 history bit

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?