![Trinamic TMCM-351 Firmware Manual Download Page 37](http://html1.mh-extra.com/html/trinamic/tmcm-351/tmcm-351_firmware-manual_1163054037.webp)
TMCM-351 TMCL Firmware V4.45 Manual (Rev. 1.06 / 2014-MAY-16)
37
www.trinamic.com
I/O
PORTS USED FOR
SIO
AND COMMAND
A
DDRESSING ALL SIX OUTPUT LINES WITH ONE
SIO
COMMAND
:
Proceed as follows:
-
Set the type parameter to 255 and the bank parameter to 2.
-
The value parameter must then be set to a value between 0…255, where every bit represents one
output line.
-
Furthermore, the value can also be set to -1. In this special case, the contents of the lower 8 bits of
the accumulator are copied to the eight output pins.
Example:
Set all output pins high.
Mnemonic:
SIO 255, 2, 255
T
HE FOLLOWING PROGRAM WILL SHOW THE STATES OF THE EIGHT INPUT LINES ON THE OUTPUT LINES
:
Loop: GIO 255, 0
SIO 255, 2,-1
JA Loop
A
DJUSTING THE ANALOGUE INPUT
:
It is possible to adjust the analogue input with the following commands:
SIO 8, 0, 0 for 3,3V input range
SIO 8, 0, 1 for 10V input range
C
OMMAND FOR SWITCHING THE PULL
-
UP RESISTORS FOR ADDITIONAL DIGITAL INPUTS
SIO can be used to switch the pull-up resistors for all digital inputs on and off. Bank 0 is used for this
purpose. Every pull-up resistor can be switched individually by setting the related bit using the bitmask.
Pin (connector 3)
Input
Bit
Command
Range
11
IN_0
0
SIO 0, 0,<bitmask>
0… 255
12
IN_1
1
13
IN_2
2
14
IN_3
3
15
IN_4
4
16
IN_5
5
17
ADIN_0
6
18
ADIN_1
7
1
2
20
19
Pin
I/O port
Command
Range
1
OUT_0
SIO 0, <bank number>, 1/0
1/0
2
OUT_1
SIO 1, <bank number>, 1/0
1/0
3
OUT_2
SIO 2, <bank number>, 1/0
1/0
4
OUT_3
SIO 3, <bank number>, 1/0
1/0
5
OUT_4
SIO 4, <bank number>, 1/0
1/0
6
OUT_5
SIO 5, <bank number>, 1/0
1/0
7
OUT_6
SIO 6, <bank number>, 1/0
1/0
8
OUT_7
SIO 7, <bank number>, 1/0
1/0