
RTD Embedded Technologies, Inc.
|
www.rtd.com
28
DM34216HR
User’s Manual
BDM-610010056 Rev A
Separate interrupts are generated for positive and negative rollover. Positive rollover occurs when the counter is at its maximum value and
receives a signal to count up. Negative rollover occurs when the counter is at 0 and receives a signal to count down. Because separate
interrupts are generated, the counter can be easily expanded in software.
The Incremental Encoder inputs are show in the table below.
Table 9: Incremental Encoder Inputs
Pin
CN3 Pin #
A+
13
A-
14
B+
15
B-
16
Index +
19
Index -
20
Initializing the Incremental Encoder
The following is a list of typical steps needed to initialize the incremental encoder inputs.
1.
Set the corresponding pins as input in the Advanced_DIO function block (
2.
Set the corresponding pins’
peripheral select to 0x00 (
3.
Set the Incremental Encoder function block to the Uninitialized state (
4.
Setup the DMA for the Incremental Encoder channel
5.
Pre-load with a known position (
6.
Set the mode/configuration (
7.
Set the start and stop triggers (
8.
Set the pacer clock (
9.
Set the Pre and/or Post Capture counters (
10.
Set the Incremental Encoder function block to the Reset state (
11.
Start the DMA
12.
Start the Incremental Encoder function block (
5.6.3
E
XTERNAL
C
LOCKING
The DM34216HR features an external clocking function block. This feature allows the user to input a clock to drive a CLK_BUSn signal or
output a CLK_BUSn signal. The CLK_SRCn are used to drive the CLK_BUSn signal which are part of the most FPGA function blocks. The
CLK_BUSn signals are used as either sample clocks for function blocks or triggers for starting and stopping them.
There are 6 available CLK_BUSn, each is associated with a pin on CN3. Each can be configured to be either an input or an output. As an input
to a CLK_BUSn, the max input clock frequency is ½ system clock frequency. This value can be found in
As an output CLK_BUSn will generated on the associated pin. By default, this signal will be a pulse that is high for 10ns when the CLK_BUSn
signal goes high. The width of this pulse can be increased using
Inputting an External Signal to the Clock Bus
The following is a list of typical steps needed to perform to input an external signal to the clock bus.
1.
Connect the external signal to one of the external clocking pins EXT_CLK_2- EXT_CLK_7
2.
Connect the gated signal to corresponding EXT_CLK_GATE_N, if gated signal is being used.
3.
Set the corresponding pin as input in the Advanced_DIO function block (
4.
Set the corresponding pin’s
peripheral select to 0x00 (
5.
Set the corresponding clock as input in the External Clocking function block (
6.
Set the corresponding clock’s edge detect
7.
Enable the external clock (
Outputting a Signal from the Clock Bus
The following is a list of typical steps needed to perform to output an external signal from the clock bus.