User manual

TMCM-1160 TMCL Firmware V1.19 Manual (Rev. 1.01 / 2012-JUL-27) 40
www.trinamic.com
Multi-purpose
I/O
1
8
Figure 3.2 I/O connector
3.6.15.1 I/O Bank 0 Digital Inputs:
The ADIN lines can be read as digital or analogue inputs at the same time. 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.6.15.2 I/O Bank 1 Analogue Inputs:
The ADIN lines can be read back as digital or analogue inputs at the same time. The digital states
can be accessed in bank 0.
Pin
I/O port
Command
Range
3
IN_0
GIO 0, 0
0/1
4
IN_1
GIO 1, 0
0/1
Pin
I/O port
Command
Range
3
IN_0
GIO 0, 1
0… 4095
4
IN_1
GIO 1, 1
0… 4095