beautypg.com

Delta DVP-ES2 User Manual

Page 243

background image

3 . I n s t r u c t i o n S e t

3 - 1 2 7

¾ 6 comparators are available for software counters while 8 comparators are available for

2 groups of hardware counters ( 4 comparators for each group)

¾ Output timing of software comparator Æ count value equals to comparative value in both

counting up/down modes.

¾ Output timing of the hardware comparator with firmware version 1.xx Æ count value

equals to comparative value+1 in counting-up mode; count value equals to comparative

value -1 in counting-down mode.

¾ Output timing of the hardware comparator with firmware version 2.00 and above Æ count

value equals to comparative value in both counting up/down modes.

8.

Difference between software and hardware comparators (it is only applicable to DVP-SE):

¾ 6 comparators are available for software counters while 4 comparators are available for

2 groups of hardware counters ( 2 comparators for each group)

¾ Output timing of software comparator Æ count value equals to comparative value in both

counting up/down modes.

¾ Output timing of the hardware comparator Æ count value equals to comparative value+1

in counting-up mode; count value equals to comparative value -1 in counting-down

mode.

Program Example 1:

Set/reset M0 by applying software comparator

M1000

DCNT

C235

K100

DHSCS

C235

K100

M0

¾

When value in C235 varies from 99 to100, DHSCS instruction sets M0 ON. (M1235 =

OFF, C235 counts up)

¾

When value in C235 varies from 101 to100, DHSCR instruction resets M0. (M1235 = ON,

C235 counts down)

¾

Timing diagram for the comparison:

Counting
No.

Time

Count up

Count down

M0

101

100

99

98

101

100

99

98

1

2

Program Example 2:

Set/reset M0 by applying hardware comparator

This manual is related to the following products: