User manual

PD-1021 TMCL Firmware V1.19 Manual (Rev. 1.01 / 2012-JUL-30) 35
www.trinamic.com
Power, communication
and multi-purpose I/O
1
Figure 3.2: I/O connector of PD-1021
3.5.15.1 I/O bank 0 digital inputs:
IN_3 can be read as digital or analogue input. The analogue values can be accessed in bank 1.
READING ALL DIGITAL INPUTS WITH ONE GIO COMMAND:
- Set the type parameter to 255 and the bank parameter to 0.
- In this case the status of all digital input lines will be read to the lower eight bits of the
accumulator.
USE FOLLOWING PROGRAM TO REPRESENT THE STATES OF THE INPUT LINES ON THE OUTPUT LINES:
Loop: GIO 255, 0
SIO 255, 2,-1
JA Loop
3.5.15.2 I/O bank 1 analogue input:
IN_3 can be read back as digital or analogue input. The digital states can be accessed in bank 0.
3.5.15.3 I/O bank 2 the states of digital outputs
The states of the OUT lines (that have been set by SIO commands) can be read back using bank 2.
Pin
I/O port
Command
Result range
5
IN_0
GIO 0, 0
0/1
6
IN_1
GIO 1, 0
0/1
7
IN_2 (same pin as OUT_0)
GIO 2, 0
0/1
8
IN_3 (same pin as OUT_1)
GIO 3, 0
0/1
Pin
I/O port
Command
Result range
8
IN_3 (same pin as OUT_1)
GIO 3, 1
0… 4095
Pin
I/O port
Command
Result range
7
OUT_0
GIO 0, 2
0/1
8
OUT_1
GIO 1, 2
0/1
Please note, that the module has four I/O pins
including four input pins:
Pin 5: IN_O (digital)
Pin 6: IN_1 (digital)
Pin 7: IN_2 (digital)
Pin 8: IN_3 (digital or analog)
Please refer to the Hardware Manual for further
information.