ADSP-BF50x Blackfin Processor Hardware Reference
13-5
General-Purpose Counter
It is possible to reverse the count direction of the Gray coded signal. This
can be achieved by enabling the polarity inverter of either the
CUD
pin or
the
CDG
pin. Inverting both pins will not alter the behavior. This feature
can be enabled with the
CDGINV
and
CUDINV
bits in the
CNT_CONFIG
register.
As an example, if the
CDG
:
CUD
inputs are 00 respectively and the next tran-
sition is to 01, this would normally increment the counter as is shown in
Table 13-1
. If the
CUD
polarity is inverted this generates a received input of
01 followed by 00. This will result in a decrement of the counter, altering
the behavior of the connected hardware.
Binary Encoder Mode
This mode is almost identical to the previous mode, with the exception
that the
CUD:CDG
inputs expect a binary-encoded signal. The order of tran-
sitions of the
CUD
and
CDG
inputs determines whether the counter
increments or decrements. The
CNT_COUNTER
register contains the number
of transitions that have occurred. Refer to
Table 13-2
.
Optionally, an interrupt is generated if the detected code steps by more
than 1 (in binary arithmetic) within one
SCLK
cycle. Such transitions are
considered erroneous. Therefore, the
CNT_COUNTER
register remains
unchanged and an error condition is signaled.
Table 13-1. Quadrature Events and Counting Mechanism
CNT_COUNTER Register Value
–4
–3
–2
–1
0
+1
+2
+3
+4
CDG:CUD Inputs
00
01
11
10
00
01
11
10
00
Table 13-2. Binary Events and Counting Mechanism
CNT_COUNTER Register Value
–4
–3
–2
–1
0
+1
+2
+3
+4
CDG:CUD Inputs
00
01
10
11
00
01
10
11
00
Summary of Contents for EZ-KIT Lite ADSP-BF506F
Page 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Page 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...