8160-dioheader: Difference between revisions
From embeddedTS Manuals
(Created page with "The DIO is manipulated through tsctl, or through manipulation of the registers directly. Using tsctl will be the easiest way to communicate with the IO....") |
No edit summary |
||
Line 44: | Line 44: | ||
| 4 | | 4 | ||
| I2C_CLK | | I2C_CLK | ||
| | | | ||
|- | |- | ||
| 5 | | 5 | ||
Line 52: | Line 52: | ||
| 6 | | 6 | ||
| SPI_CS# | | SPI_CS# | ||
| | | | ||
|- | |- | ||
| 7 | | 7 | ||
Line 60: | Line 60: | ||
| 8 | | 8 | ||
| I2C_DAT | | I2C_DAT | ||
| | | | ||
|- | |- | ||
| 9 | | 9 | ||
Line 68: | Line 68: | ||
| 10 | | 10 | ||
| SPI_MISO | | SPI_MISO | ||
| | | | ||
|- | |- | ||
| 11 | | 11 | ||
Line 76: | Line 76: | ||
| 12 | | 12 | ||
| SPI_MOSI | | SPI_MOSI | ||
| | | | ||
|- | |- | ||
| 13 | | 13 | ||
Line 84: | Line 84: | ||
| 14 | | 14 | ||
| SPI_CLK | | SPI_CLK | ||
| | | | ||
|- | |- | ||
| 15 | | 15 |
Revision as of 22:50, 26 February 2012
The DIO is manipulated through tsctl, or through manipulation of the registers directly.
Using tsctl will be the easiest way to communicate with the IO. This example will show the simplest way to toggle the IO, but see the tsctl page for more advanced usage.
# Start tsctl server if it is not already running.
# This only needs to be done once
tsctl --server &
# Lookup the logical DIO mapping of the dio header pin 1
eval `tsctl 127.0.0.1 System MapLookup DIO_1`
# If you run this outside of the eval it will return:
# DIO_1=130
# Toggle the DIO high and low:
tsctl 127.0.0.1 DIO Set $DIO_1 high
tsctl 127.0.0.1 DIO Set $DIO_1 low
Pinout | Header | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
WARNING: | DIO are not 5V tolerant. Only SPI_MOSI on this header is 5V tolerant. |