CTU

CTU (Count Up)

 

CTU instruction counts upward by one. When disabled, the CTU instruction retains its ACC value.

 

 

C

Counter device address to set

V

Preset value

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

Error

Zero

Carry

CTU

C

-

-

-

-

-

-

-

o

-

-

-

-

-

3

-

-

-

V

-

-

-

-

-

-

-

-

-

-

o

-

o

 

When enabled, CTU instruction increments the counter by one. Even if the CTU instruction is disabled, it retains its ACC value. When ACC value reaches preset value, counter bit is set.

The range of preset (v) : 0 ~ 65535

 

Example)

Whenever M00 is ON, the CTU instruction increments the counter by one. When ACC value reaches 10, C10 and Y15 will be set.

 

 

When ACC value reaches 10, C10 and Y15 will be set.

 

 

When M01 is ON, the ACC value is cleared.