Lantronix 900-618 manual Examples, Command 19h, Set Directions, Command 1Ah, Set Active Levels

Page 65

9: GPIO Interface

Command 19h, Set Directions

Send:

2parameters Bytes 1-4: Mask

Bit X 1 means the direction for GPIO X will be updated with the value in the second parameter.

0 means the direction for that GPIO will not change. Bytes 5-8: New Directions

Bit X 1 means GPIO X will become an output.

0 means it will become an input.

Response:

1 parameter

Bytes 1-4: The updated directions

Command 1Ah, Set Active Levels

Send:

2parameters Bytes 1-4: Mask

Bit X 1 means the direction for GPIO X will be updated with the value in the second parameter.

0 means the active type for that GPIO will not change. Bytes 5-8: New Active Levels

Bit X 1 means GPIO X will become active low.

0 means it will become active high.

Response:

1 parameter

Bytes 1-4: Updated active levels

Command 1Bh, Set States

Send:

2parameters Bytes 1-4: Mask

Bit X 1 means the state for GPIO X will be updated with the value in the second parameter.

0 means the state for that GPIO will not change. Bytes 5-8: New States

Bit X 1 means GPIO X will become active.

0 means it will become inactive.

Response:

1 parameter

Bytes 1-4: Updated states

Examples

Example 1: PC sends command 10h to find out which configurable pins are available as GPIO.

PC -> xPico: 10h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h

xPico -> PC: 10h, 03h, 00h, 00h, 00h

Command details:

xPico User Guide

65

Image 65
Contents User Guide Technical Support Sales Offices Lantronix Corporate HeadquartersDisclaimer Table of Contents Configuration via Telnet or Serial Port Setup Mode Setup Mode Advanced Settings Gpio Interface List of Figures List of TablesChapter Summary Using This GuidePurpose and Audience XPico Integration Guide Additional DocumentationApplications IntroductionCapabilities Protocol Support Configuration MethodsAddresses and Port Numbers Hardware AddressPort Numbers Product Information LabelIP Address Installing DeviceInstaller Using DeviceInstallerTo install DeviceInstaller Assigning an IP AddressTo view the units current settings Accessing the xPico Using DeviceInstallerSelect Assign a specific IP address and click Next NameGroup Dhcp Device NameComments Device FamilySupports Configurable Firmware UpgradeablePins Supports Http SetupAccessing Web-Manager Using DeviceInstaller Configuration Using Web ManagerWeb-Manager Login Window Network ConfigurationSelect Obtain IP address automatically Network ModeTo assign an IP address automatically Ethernet Configuration Static IP Address ConfigurationSelect Use the following IP configuration To assign an IP address manuallyAuto Negotiate To configure the xPico’s device server settingsAdvanced Host List ConfigurationServer Configuration Retry Settings Channel 1 and 2 ConfigurationTo configure the xPico’s host list Host InformationPort Settings Serial SettingsTo configure the channel’s serial settings ChannelFlush Input Buffer Serial to Network Pack ControlTo configure a channel’s TCP settings Connection Settings TCPFlush Output Buffer Network to Serial At Time of DisconnectTCP Connection Settings Connect Mode Active Connection Connect Mode Passive ConnectionEndpoint Configuration Connect ProtocolTo configure a channel’s UDP settings Connection Settings UDPDisconnect Mode Datagram Type Datagram ModeUse Broadcast Device Address TableTo configure the xPico’s Configurable Pins Configurable Pin SettingsConfigurable Pin Functions Apply Defaults Apply SettingsSerial Channel 1 Status LED Serial Channel 2 Status LEDTelnet Connection Configuration via Telnet or Serial Port Setup ModeAccessing Setup Mode To establish a Telnet connection Serial Port ConnectionTo exit setup mode Exiting Setup ModeServer Configuration Option Setup Mode Server ConfigurationBootP/DHCP/AutoIP Options IP AddressSet Gateway IP Address Change Telnet/Web-Manager PasswordNetmask Number of Bits for Host Part Set DNS Server IP AddressDhcp Name Baudrate Setup Mode Channel ConfigurationChannel 1 Option 1 or Channel 2 Option Interface Mode Options Interface ModeRS232 Interface Mode Settings FlowPort Number Connect ModeFlow Control Options Reserved Port NumbersIncoming Connection Connect Mode OptionsIncoming Connection ResponseActive Startup ResponseManual Connection Address Example Manual ConnectionHostlist Option To enable the hostlistDirected UDP Modem ModeDatagram Type Numeric Response Modem Mode CommandsAuto Increment Source Port Send the Escape Sequence +++ in Modem ModeShow IP addr after Ring Remote IP Address Disconnect Mode OptionsPack Control Flush Mode Buffer FlushingSend Characters Packing IntervalTrailing Characters Channel Port Password DisConnTime Inactivity TimeoutSend Characters Telnet Terminal TypeTCP Keepalive time in seconds Setup Mode Advanced SettingsExpert Settings Option Disable Monitor Mode at bootup ARP Cache timeout in secondsCPU Performance Http Port NumberTCP Re-Transmission Timeout Security Settings OptionEnable alternate MAC Ethernet Connection TypeSnmp Community Name Disable SnmpDisable Telnet Setup Disable Port 77FE Hex Disable Tftp Firmware UpgradeDisable Web Server Disable Web SetupTo configure AES encryption on the xPico Enable EncryptionEnable Enhanced Password Default Settings OptionDisable Port 77F0 Hex Channel 1 and Channel 2 Configuration DefaultsSecurity Settings Defaults Expert Settings DefaultsHostlist retry timeout Start character for serial channelGpio Interface Configurable PinsFeatures Byte 0 Command Types CommandsControl Protocol GuidelinesCommand 11h, Get Directions Command 10h, Get FunctionsCommand 12h, Get Active Levels Command 13h, Get Current StatesCommand 1Ah, Set Active Levels Command 19h, Set DirectionsCommand 1Bh, Set States Command detailsResponse details Using Tftp Graphical User Interface Firmware UpgradesObtaining Firmware Reloading Firmware To download new firmware from a computerTftp Window Using Tftp Command Line InterfaceTo recover firmware Entering Monitor Mode Using the Serial Port Monitor ModeEntering Monitor Mode Using the Network Port Monitor Mode CommandsG0, G1, ....,Ge, Gf Monitor Mode CommandsS0, S1,...,Se, Sf ExampleResponse Meaning Command Response CodesProblems and Error Messages TroubleshootingLock on Caps Lock is not onTroubleshooting Technical Support Europe, Middle East, and Africa Technical SupportTechnical Support US Converting Binary to Hexadecimal Binary to Hexadecimal ConversionsConversion Table Scientific CalculatorBinary to Hexadecimal Conversions RoHS Notice Compliance