17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Instruction Set<br />

‣ 6 comparators are available for software counters while 8 comparators are available for<br />

2 groups of hardware counters ( 4 comparators for each group)<br />

‣ Output timing of software comparator count value equals to comparative value in both<br />

counting up/down modes.<br />

‣ Output timing of the hardware comparator with firmware version 1.xx count value<br />

equals to comparative value+1 in counting-up mode; count value equals to comparative<br />

value -1 in counting-down mode.<br />

‣ Output timing of the hardware comparator with firmware version 2.00 and above count<br />

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

8. Difference between software and hardware comparators (it is only applicable to <strong>DVP</strong>-SE):<br />

‣ 6 comparators are available for software counters while 4 comparators are available for<br />

2 groups of hardware counters ( 2 comparators for each group)<br />

‣ Output timing of software comparator count value equals to comparative value in both<br />

counting up/down modes.<br />

‣ Output timing of the hardware comparator count value equals to comparative value+1<br />

in counting-up mode; count value equals to comparative value -1 in counting-down<br />

mode.<br />

Program Example 1:<br />

Set/reset M0 by applying software comparator<br />

M1000<br />

DCNT C235 K100<br />

DHSCS<br />

K100<br />

C235<br />

M0<br />

‣ When value in C235 varies from 99 to100, DHSCS instruction sets M0 ON. (M1235 =<br />

OFF, C235 counts up)<br />

‣ When value in C235 varies from 101 to100, DHSCR instruction resets M0. (M1235 = ON,<br />

C235 counts down)<br />

‣ Timing diagram for the comparison:<br />

2<br />

1<br />

M0<br />

Counting<br />

No.<br />

101<br />

100<br />

99<br />

98<br />

Count up<br />

Program Example 2:<br />

Set/reset M0 by applying hardware comparator<br />

101 100 99 98<br />

Count down<br />

Time<br />

3-127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!