Difference between revisions of "DcAN I/O Interface"

From eMDeeWiki
Jump to navigationJump to search
 
(7 intermediate revisions by the same user not shown)
Line 21: Line 21:
 
|-
 
|-
 
! width="100" bgcolor="#CCCCCC" |Byte Offset
 
! width="100" bgcolor="#CCCCCC" |Byte Offset
! width="280" bgcolor="#CCCCCC" |Element
+
! width="220" bgcolor="#CCCCCC" |Element
 +
! width="320" bgcolor="#CCCCCC" |Notes
  
 
|-
 
|-
 
! bgcolor="#CCCCCC" |0
 
! bgcolor="#CCCCCC" |0
 
| bgcolor="#FFBBBB" |0x301
 
| bgcolor="#FFBBBB" |0x301
 
+
| bgcolor="#CCCCCC" |
 
|-
 
|-
 
! bgcolor="#CCCCCC" |2
 
! bgcolor="#CCCCCC" |2
 
| bgcolor="#FFBBBB" |Request ID
 
| bgcolor="#FFBBBB" |Request ID
 
+
| bgcolor="#CCCCCC" |Arbitrary value that will be sent back in the response
 
|-
 
|-
 
! bgcolor="#CCCCCC" |4
 
! bgcolor="#CCCCCC" |4
| bgcolor="#FFBBBB" |# Bytes to Read
+
| bgcolor="#FFBBBB" |I2C Bus ID
 
+
| bgcolor="#CCCCCC" |0=I2C Bus 'A'<br>1=I2C Bus 'B'
 
|-
 
|-
 
! bgcolor="#CCCCCC" |6
 
! bgcolor="#CCCCCC" |6
| bgcolor="#FFBBBB" |I2C Address
+
| bgcolor="#FFBBBB" |# Bytes to Read
 
+
| bgcolor="#CCCCCC" |
 
|-
 
|-
 
! bgcolor="#CCCCCC" |8
 
! bgcolor="#CCCCCC" |8
| bgcolor="#FFBBBB" |Read Mode:<br>0 = One-time read<br>1 = Periodic<br>2 = On Change + Periodic
+
| bgcolor="#FFBBBB" |I2C Address
 
+
| bgcolor="#CCCCCC" |
 
|-
 
|-
 
! bgcolor="#CCCCCC" |10
 
! bgcolor="#CCCCCC" |10
| bgcolor="#FFBBBB" |Periodic Read Frequency (milliseconds)
+
| bgcolor="#FFBBBB" |Read Mode
 +
| bgcolor="#CCCCCC" |0=One-time read<br>1=Periodic<br>2=On Change + Periodic
 +
|-
 +
! bgcolor="#CCCCCC" |12
 +
| bgcolor="#FFBBBB" |Periodic Read Frequency
 +
| bgcolor="#CCCCCC" |millseconds
  
 
|}
 
|}
Line 62: Line 68:
 
! width="100" bgcolor="#CCCCCC" |Byte Offset
 
! width="100" bgcolor="#CCCCCC" |Byte Offset
 
! width="280" bgcolor="#CCCCCC" |Element
 
! width="280" bgcolor="#CCCCCC" |Element
 
 
|-
 
|-
 
! bgcolor="#CCCCCC" |0
 
! bgcolor="#CCCCCC" |0
 
| bgcolor="#FFBBBB" |0x302
 
| bgcolor="#FFBBBB" |0x302
 +
|-
 +
! bgcolor="#CCCCCC" |2
 +
| bgcolor="#FFBBBB" |Request ID
 +
|-
 +
! bgcolor="#CCCCCC" |4
 +
| bgcolor="#FFBBBB" |I2C Bus ID
 +
|-
 +
! bgcolor="#CCCCCC" |6
 +
| bgcolor="#FFBBBB" |# Bytes Returned
 +
|-
 +
! bgcolor="#CCCCCC" |8
 +
| bgcolor="#FFBBBB" |Data Returned from I2C
 +
 +
|}
 +
 +
==I2C Write==
 +
<ul>
 +
<li>The first 10 bytes of the I2C Write Packet are 16 bit unsigned integers</li>
 +
<li>The first 16 bit word of the packet represents the unique identifier and must be equal to 0x303</li>
 +
</ul>
 +
 +
 +
{| style="text-align:center"
 +
 +
|-
 +
! width="100" bgcolor="#CCCCCC" |Byte Offset
 +
! width="220" bgcolor="#CCCCCC" |Element
  
 +
|-
 +
! bgcolor="#CCCCCC" |0
 +
| bgcolor="#FFBBBB" |0x303
 
|-
 
|-
 
! bgcolor="#CCCCCC" |2
 
! bgcolor="#CCCCCC" |2
 
| bgcolor="#FFBBBB" |Request ID
 
| bgcolor="#FFBBBB" |Request ID
 +
|-
 +
! bgcolor="#CCCCCC" |4
 +
| bgcolor="#FFBBBB" |I2C Bus ID
 +
|-
 +
! bgcolor="#CCCCCC" |6
 +
| bgcolor="#FFBBBB" |# Bytes to Write
 +
|-
 +
! bgcolor="#CCCCCC" |8
 +
| bgcolor="#FFBBBB" |I2C Address
 +
|-
 +
! bgcolor="#CCCCCC" |10...
 +
| bgcolor="#FFBBBB" |Bytes to be Written
 +
 +
|}
 +
 +
==Write Display Pixel Data==
 +
<ul>
 +
<li>The first 14 bytes of the Write Display Data Packet are 16 bit unsigned integers</li>
 +
<li>The first 16 bit word of the packet represents the unique identifier and must be equal to 0x304</li>
 +
</ul>
 +
 +
 +
{| style="text-align:center"
  
 +
|-
 +
! width="100" bgcolor="#CCCCCC" |Byte Offset
 +
! width="340" bgcolor="#CCCCCC" |Element
 +
|-
 +
! bgcolor="#CCCCCC" |0
 +
| bgcolor="#FFBBBB" |0x304
 +
|-
 +
! bgcolor="#CCCCCC" |2
 +
| bgcolor="#FFBBBB" |I2C Bus ID
 
|-
 
|-
 
! bgcolor="#CCCCCC" |4
 
! bgcolor="#CCCCCC" |4
| bgcolor="#FFBBBB" |# Bytes Returned
+
| bgcolor="#FFBBBB" |I2C Address
 
 
 
|-
 
|-
 
! bgcolor="#CCCCCC" |6
 
! bgcolor="#CCCCCC" |6
| bgcolor="#FFBBBB" |Data Returned from I2C
+
| bgcolor="#FFBBBB" |Beginning Pixel Column
 +
|-
 +
! bgcolor="#CCCCCC" |8
 +
| bgcolor="#FFBBBB" |Beginning Pixel Row
 +
|-
 +
! bgcolor="#CCCCCC" |10
 +
| bgcolor="#FFBBBB" |Total Number of Pixel Columns
 +
|-
 +
! bgcolor="#CCCCCC" |12
 +
| bgcolor="#FFBBBB" |Total Number of Pixel Rows
 +
|-
 +
! bgcolor="#CCCCCC" |14...
 +
| bgcolor="#FFBBBB" |Array of Pixel Columns and Rows (8 pixels per byte)
  
 
|}
 
|}

Latest revision as of 14:56, 26 September 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 Notes
0 0x301
2 Request ID Arbitrary value that will be sent back in the response
4 I2C Bus ID 0=I2C Bus 'A'
1=I2C Bus 'B'
6 # Bytes to Read
8 I2C Address
10 Read Mode 0=One-time read
1=Periodic
2=On Change + Periodic
12 Periodic Read Frequency millseconds

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 I2C Bus ID
6 # Bytes Returned
8 Data Returned from I2C

I2C Write

  • The first 10 bytes of the I2C Write Packet are 16 bit unsigned integers
  • The first 16 bit word of the packet represents the unique identifier and must be equal to 0x303


Byte Offset Element
0 0x303
2 Request ID
4 I2C Bus ID
6 # Bytes to Write
8 I2C Address
10... Bytes to be Written

Write Display Pixel Data

  • The first 14 bytes of the Write Display Data Packet are 16 bit unsigned integers
  • The first 16 bit word of the packet represents the unique identifier and must be equal to 0x304


Byte Offset Element
0 0x304
2 I2C Bus ID
4 I2C Address
6 Beginning Pixel Column
8 Beginning Pixel Row
10 Total Number of Pixel Columns
12 Total Number of Pixel Rows
14... Array of Pixel Columns and Rows (8 pixels per byte)