Measurement-computing CIO-QUAD0x Manuel d'utilisateur Page 13

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 20
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 12
x01x x11xModulo-N
x01x x10xNon-recycle
x01x x01xRange-Limit
x01x x00xNormal
Bit 1 & 2 value for mode selectionCMR Count Mode
Count Mode Definitions:
Range Limit: An upper limit, set by PR, and a lower limit, set to 0, are set. The CNTR stops at CNTR=PR when
counting UP and when CNTR=0 when counting DOWN. Counting resumed only when the count direction is reversed.
Non-Recycle: CNTR is disabled whenever an overflow or underflow happens. End-of-cycle marked by Carry (UP) or
Borrow (DOWN). Re-enabled by reset or load on CNTR.
Modulo-N: Count boundary set between 0 and content of PR. When counting up, at CNTR=PR, the CNTR is reset to
0 and the up count is continued from that point. When counting down, at CNTR=0, the CNTR is loaded with content
of PR and the down-count is continued from that point.
Quadrature scaling (bits 3 & 4)
There are four different scaling values that can be applied to quadrature signals: Non-quad, X1, X2, and X4. The scaling to
be applied is set in bits 3 & 4 (D3 and D4 - see Table 4-1) of the CMR register. Assuming the attached encoder generates
2500 pulses per revolution in X1 mode, then you would receive 5000 pulses in X2 mode and 10000 pulses in X4 mode. If
the board will be used to detect simple clock pulses then select Non-Quadrature mode.
x011 1xxxX4
x011 0xxxX2
x010 1xxxX1
x010 0xxxNon-Quadrature
Bit 3 & 4 value for quad scalingCMR Quadrature Scaling
Input/Output Control Register (IOR)
The IOR register contains four user configurable fields and should be initialized prior to writing the IDR register which
follows. The IOR register, in conjunction with the IDR register, configures how the A and B input signals are interpreted.
A/B configuration bit (bit 0 - LSB)
This configuration bit (D0 - see Table 4-1) controls whether or not the A and B inputs are enabled or disabled. This bit must
be enabled for the counter to respond to input clock pulses.
x10x xxx1Enable A and B
x10x xxx0Disable A and B
Bit 0 value for enable/disableIOR A/B enable/disable
LCNTR/LOL Pin Configuration (bit 1)
This register is only applicable if the IDR register bit 2 is reset to (0). In this case the Index input from the external encoder
is directed to the LCNTR/LOL pin. This bit (D1 - see Table 4-1) then configures the operation of the LCNTR/LOL pin. The
operation can be set to either load the counter with the preset value or load the output latch input. Thus, if the IDR register
specifies the Load CNTR operation, then each time the Index input is asserted, the counter will be reloaded with the value
stored in the preset. If the Load OL input option is selected, then each Index input will cause the current counter value to be
updated to the Output Latch. In this mode you are not required to use the RLD register to force the contents of the counter
to be copied to the output latch. The contents of the counter will automatically be available at the Output Latch every time
the Index signal is asserted.
Note: The Index input is asserted once per revolution.
x10x xx1xLoad OL input
x10x xx0xLoad CNTR
Bit 1 value for CNTR/LOL selectIOR LCNTR/LOL pin configuration
9
Vue de la page 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 19 20

Commentaires sur ces manuels

Pas de commentaire