Function description – Samsung S3F401F User Manual

Page 51

Advertising
background image

S3F401F_UM_REV1.00

ENCODER COUNTER

4-3

2. FUNCTION DESCRIPTION

PHASEA

PHASEB

+1 +1 +1 +1 +1 +1 +1 +1 +1 +1

+1

-1 -1 -1 -1 -1

PCNT

ENCSTATUS.0 = DIRECTION

0

1

Figure 4-2. Position Counter Operation

To measure position and speed the encoder counter has the three input signals, PHASEA, PHASEB and PHASEZ.

The difference of phase between phase A and phase B pulse is 90°. The input of PHASEZ is one-pulse signal to be
generated at specific position 1 cyclic.

2.1 POSITION COUNTER OPERATION

Direction of Rotation

When DIRECTIONT bit is ‘0’, the counter value of PCNT increases. On the other hands, when DIRECTION bit is ‘1’,
PCNT decreases. Position counter is an up and down counter. The DIRECTION bit status and counting direction are
decided which phase signal between PHASE A and PHASE B is leading.

NOTE

Although the PBEN and PAEN bit are ‘0’, disable, if inserted any signal into PHASE A, PHASE B input port
and CAP_A0/A1 and CAP_B0/B1 interrupt are unmask, those interrupts occur until interrupts mask or
non-signal.

Advertising