14 High Speed Compare and Capture 14.1 High Speed Compare and Capture Function DVP-PM supports 8 sets of registers for high-speed Compare and Capture function. Through FROM/TO instructions we can access CR253 for setting the control status or reading the data for high speed Compare or Capture function. The below table explains the settings of FROM/TO instructions and the relative registers. „ Setting control registers X0 D0 The number of the starting set: n (n=0~7, 8 sets) D1 0 D3,D2 Control register of the n set: CRn D5,D4 Data register of the n set: DRn D7,D6 Control register of the n+1 set: CRn+1 D9,D8 Data register of the n+1 set: DRn+1 : D31,D30 Control register of the n+7 set:
CRn+7 D33,D32 Data register of the n+7 set: DRn+7 D50 Data length : 2+m*4 (1 set of registers : 4 word s). m: number of sets. Max: 8 sets.
(1) Setting format of control registers (CRn) for high-speed Compare function DVP-PM Application Manual 14-1 TO K253 K1 D0 D50 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Setting s Output ter minals and coun te rs Output action C ompa re m ethod D ata so urce for comp arison Bit SV 20PM 10PM Data source for comparison [0-3] 0 CP of X axis CP of X axis 1 CP of Y axis CP of Y axis 2 CP of Z axis CP of Z axis 3 C200 count value CP of A axis 4 C204 count value C200 count value 5 - C204 count value 6 - C208 count value 7 - C212 count value Compare mehod [5-4] 1 = = 2 ≧ ≧ 3 ≦ ≦ Output action [7-6] 0 Set Set 1 Reset Reset 2, 3 - No action Output terminal and counters [11-8] 0 CLR0 Y0 1 CLR1 Y1 2 Y2 Y2