Difference between revisions of "DcAN I/O Interface"

From eMDeeWiki
Jump to navigationJump to search
Line 38: Line 38:
 
! bgcolor="#CCCCCC" |6
 
! bgcolor="#CCCCCC" |6
 
| bgcolor="#FFBBBB" |I2C Address
 
| bgcolor="#FFBBBB" |I2C Address
 +
 +
|-
 +
! bgcolor="#CCCCCC" |8
 +
| bgcolor="#FFBBBB" |Read Mode:<br>0 = One-time read<br>1 = Periodic<br>2 = On Change + Periodic
 +
 +
|-
 +
! bgcolor="#CCCCCC" |10
 +
| bgcolor="#FFBBBB" |Periodic Read Frequency (milliseconds)
  
 
|}
 
|}
 
  
 
==I2C Read Response==
 
==I2C Read Response==

Revision as of 10:08, 25 March 2019

Data can be passed between a client and a DcAN I/O device through the DcAN I/O Interface. Packets are sent through a TCP/IP port. The following rules apply:

  • The I/O device shall listen for TCP/IP connections on IP port number 33001
  • A maximum of 3 clients can simultaneously connect to the DcAN I/O Interface port
  • All elements of each packet shall be in network byte order

The following sections define the packets that are valid for the DcAN I/O Interface


I2C Read Request

  • Each element of the I2C Read Request Packet is a 16 bit unsigned integer
  • The first 16 bit word of the packet represents the unique identifier and must be equal to 0x301
  • An I2C Read Response Packet with the requested data will be sent back to the client in response to each I2C Read Request


Byte Offset Element
0 0x301
2 Request ID
4 # Bytes to Read
6 I2C Address
8 Read Mode:
0 = One-time read
1 = Periodic
2 = On Change + Periodic
10 Periodic Read Frequency (milliseconds)

I2C Read Response

  • Each element of the I2C Read Response Packet is a 16 bit unsigned integer
  • The first 16 bit word of the packet represents the unique identifier and must be equal to 0x302
  • An I2C Read Response Packet is sent to the client in response to an I2C Read Request


Byte Offset Element
0 0x302
2 Request ID
4 # Bytes Returned
6 Data Returned from I2C