User manual
TMCM-1141 TMCL Firmware V1.19 Manual (Rev. 1.01 / 2012-JUL-27) 36
www.trinamic.com
3.6.14 SIO (set input / output)
- SIO sets the status of the general digital output either to low (0) or to high (1). Bank 2 is used for
this purpose.
- SIO is used to switch the pull-up resistors for all digital inputs ON (1) and OFF (0). Bank 0 is used
for this purpose.
Internal function: the passed value is transferred to the specified output line.
Related commands: GIO, WAIT
Mnemonic: SIO <port number>, <bank number>, <value>
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
14
<port number>
<bank number>
2
<value>
0/1
Reply structure:
STATUS
VALUE
100 – OK
don’t care
Example:
Set OUT_7 to high (bank 2, output 7)
Mnemonic: SIO 7, 2, 1
Binary:
Byte Index
0
1
2
3
4
5
6
7
Function
Target-
address
Instruction
Number
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$01
$0e
$07
$02
$00
$00
$00
$01
1
I/O
connector
Figure 3.1 I/O connector
I/O PORTS USED FOR SETTING THE STATUS OF THE INPUT TO LOW OR HIGH
Pin
I/O port
Command
Range
3
OUT_0
SIO 0, 2, <n>
1/0
4
OUT_1
SIO 1, 2, <n>
1/0
ADDRESSING BOTH OUTPUT LINES WITH ONE SIO COMMAND:
- 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 output pins.