TS-7180 DIO: Difference between revisions

From embeddedTS Manuals
mNo edit summary
No edit summary
Line 21: Line 21:
! OUTPUT GPIO #
! OUTPUT GPIO #
|-
|-
| 1
| DIO_1
| 37
| 37
| 22
| 22
|-
|-
| 2
| DIO_2
| 38
| 38
| 23
| 23
|-
|-
| 3
| DIO_3
| 39
| 39
| 24
| 24
|-
|-
| 4
| DIO_4
| 40
| 40
| 25
| 25
|-
|-
| 5
| DIO_5
| 41
| 41
| 26
| 26
|-
|-
| 6
| DIO_6
| 42
| 42
| 27
| 27
|-
|-
| 7
| DIO_7
| 43
| 43
| 28
| 28
|}
|}
Additionally, there are four input-only pins, DIG_IN_1 through DIG_IN_4, available on  [[TS-7180#Terminal_Blocks|P3]] connector.  To read from these pins, run:
<source lang=bash>
tshwctl -a N -r
</source>
...where N is 32 through 35.
{|
| colspan=2 |
|-
|
{| class="wikitable"
|+ DIG_IN
|-
! DIG_IN #
! INPUT GPIO #
|-
| DIG_IN_1
| 32
|-
| DIG_IN_2
| 33
|-
| DIG_IN_3
| 34
|-
| DIG_IN_4
| 35
|}
|}
|}
|}

Revision as of 11:36, 9 May 2018

The TS-7180 provides seven IO ports that can sink up to 500mA, or withstand up to 30V at the input. These are available on the P3 connector. DIO_1 through DIO_7 appear as GPIO #37 through #43 (when used as inputs), and as GPIO #22 through #28 (when used as outputs). For example, to read the state of DIO_1, enter the following command:

tshwctl -a 37 -r

Bit #2 will reflect the state of the pin.

To drive DIO_1 low, enter the following command:

tshwctl -a 22 -w 3
DIO
DIO # INPUT GPIO # OUTPUT GPIO #
DIO_1 37 22
DIO_2 38 23
DIO_3 39 24
DIO_4 40 25
DIO_5 41 26
DIO_6 42 27
DIO_7 43 28

Additionally, there are four input-only pins, DIG_IN_1 through DIG_IN_4, available on P3 connector. To read from these pins, run:

tshwctl -a N -r

...where N is 32 through 35.

DIG_IN
DIG_IN # INPUT GPIO #
DIG_IN_1 32
DIG_IN_2 33
DIG_IN_3 34
DIG_IN_4 35