SiS95xx I2C Programming Guide
I2C Programming Guide

Appendix

Appendix A – I2C Report ID Definition

Bit (0 ~ 3)Main class for Report IDBit (4 ~ 7)Extend class for Data Format
valuebinaryDescriptionvaluebinaryDescription
0x10000General Touch Data0x81000Touch + Scan time
0x40100Function Key0x91001Touch + Area (Width, Height) + Scan time
0x10001General Touch Data0xc1100Touch + Pressure + Scan time
0xd1101Touch + Area (Width, Height) + Pressure + Scan time
- Report id for communicating with AP tool is: 0x21, 0x25, 0x29, 0x2d.
Report IDLength
0x2164 * 1
0x2564 * 5
0x2964 * 9
0x2d64 * 13
### Appendix B - General I2C Touch Data Format Table according to Report ID
B0B1B2B3B4B5B6B7B8B9B10B11B12B13B14B15B16B17......Bxx...............B63
0x240x000x81S1ID1X1X1Y1Y1S2ID2X2X2Y2Y2.....................Y5CntTimeTime
0x240x000x81S6ID6X6X6Y6Y6S7ID7X7X7Y7Y7.....................Y10CntTimeTime
0x380x000x91S1ID1X1X1Y1Y1W1W1H1H1S2ID2X2X2Y2Y2W2W2...H5
CntTimeTime
0x380x000x91S6ID6X6X6Y6Y6W6W6H6H6S7ID7X7X7Y7Y7W7W7...H10CntTimeTime
0x290x000xc1S1ID1X1X1Y1Y1P1S2ID2X2X2Y2Y2P2..................P5CntTimeTime
0x290x000xc1S6ID6X6X6Y6Y6P6S7ID7X7X7Y7Y7P7..................P10CntTimeTime
0x3D0x000xd1S1ID1X1X1Y1Y1P1W1W1H1H1S2ID2X2X2Y2Y2P2...H5CntTimeTime
0x3D0x000xd1S6ID6X6X6Y6Y6P6W6W6H6H6S7ID7X7X7
Y7Y7P7...H10CntTimeTime
0x240x000x04S1ID1X1X1Y1Y1S2ID2X2X2Y2Y2..................Y5CntFKFK
0x240x000x04S6ID6X6X6Y6Y6S7ID7X7X7Y7Y7..................Y10CntFKFK
0x380x000x14S1ID1X1X1Y1Y1W1W1H1H1S2ID2X2X2Y2Y2W2W2..H5CntFKFK
0x380x000x14S6ID6X6X6Y6Y6W6W6H6H6S7ID7X7X7Y7Y7W7W7...H10CntFKFK
0x290x000x44S1ID1X1X1Y1Y1P1S2ID2X2X2Y2Y2P2...............P5CntFKFK
0x290x000x44S6ID6X6X6Y6Y6P6S7ID7X7X7Y7Y7P7...............P10CntFKFK
0x3D0x000x54S1ID1X1X1Y1Y1P1W1W1H1H1ID2S2
X2X2
Y2Y2
P2...H5CntFKFK
0x3D0x000x54S6ID6X6X6Y6Y6P6W6W6H6H6ID7S7
X7X7
Y7Y7
P7...H10CntFKFK
0x260x000x84S1ID1X1X1Y1Y1S2ID2X2X2Y2Y2..................Y5CntTimeTimeFKFK
0x260x000x84S6ID6X6X6Y6Y6S7ID7X7X7Y7Y7..................Y10CntTimeTimeFKFK
0x3A0x000x94S1ID1X1X1Y1Y1W1W1H1H1S2ID2X2X2Y2Y2W2W2...H5CntTimeTimeFKFK
0x3A0x000x94S6ID6X6X6Y6Y6W6W6H6H6S7ID7X7X7Y7Y7W7W7...H10CntTimeTimeFKFK
0x2B0x000xc4S1ID1X1X1Y1Y1P1S2ID2X2X2Y2Y2P2............P5CntTimeTimeFKFK
0x2B0x000xc4S6ID6X6X6Y6Y6P6S7ID7X7X7Y7Y7P7............P10CntTimeTimeFKFK
0x3F0x000xd4S1ID1X1X1Y1Y1P1W1W1H1H1S2ID2X2X2
Y2Y2
P2...H5CntTimeTimeFKFK
0x3F0x000xd4S6ID6X6X6Y6Y6P6W6W6H6H6S7ID7X7X7
Y7Y7
P7...H10CntTimeTimeFKFK

Introduction

This is SiS95xx touch controller programming guide. SiS touch controller communicates with the host via standard I2C interface. For specific configuration command, please refer to Chapter 2. There will bring more details.

Interface

There will introduce I2C related and the instructions of each command.

I2C Related

SiS95xx provided a full range of touch controllers for an optimum performance solution of the capacitive touch panels. The host platform can communicate with the controllers via I2C, SPI, RS232, or USB port. This section focuses on the I2C port. For I2C driver developer and relative touch software on the host platform side (the Master), this section provides the format of I2C transactions with the firmware of the controller (the Slave), and the necessary flexibility on the touch position for adjusting.

I/O Pin Definitions

Pin NumberPin NamePin AttributeDescription
1VDDPWR3.3V
2I2C_CLKIn/OutI2C Clock
3I2C_DAIn/OutI2C Data
4INTOutInterrupt Pin
5RESET#InExternal reset. Active low.
6GNDPWRGround

**Power On/Reset Sequence**

Figure 2-1 Power On Time

Figure 2-2 Reset Pulse Width
**I2C Power-On Sequence**

Figure 2-3 Power-On Sequence
DescriptionMinMaxUnit
Rise time from 0.1*VDD to 0.9*VDD-2ms
Reset pulse width10-us
From VDD stable at 3.3V to RESET# reach at 2V5-ms
Time of starting to report point after Reset# reach at 3.3V100-ms

**I2C AC Waveform**

Figure 2-4 I2C AC Waveform
SymbolParameterSCL=100KHzSCL=400KHzUnit
MinMaxMinMax
Tw(SCLH)SCL clock high time4.71.3us
Tw(SCLL)SCL clock low time4.00.6
Tsu(SDA)SDA setup time250100ns
Th(SDA)SDA data hold time00900
Tr(SDA)
Tr(SCL)
SDA&SCL rise time1000
300
Tf(SDA)
Tf(SCL)
SDA&SCLA fall time300300
Th(STA)Start condition hold time4.00.6us
Tsu(STA)Repeated Start condition setup time4.79.6
Tsu(STO)Stop condition setup time4.00.6
Tw(STO:STA)Stop to Start condition time(bus free)4.71.3

**I2C ACPI Setting**
VendorSiS
Slave Address0x5c(7-bits addressing, programmable)
Clock rate@400 kHz (fast mode)
Interrupt modeDefault active low, level trigger
_CIDPNP0C50
_DSM3CDFF6F7-4267-4555-AD05-B30A3D8938DE
HID Descriptor address0x0000

### I2C BUS Protocol Each I2C transaction transfers one I2C packet data. The INT pin is low level trigger. Touch device controller will pull INT pin low until all data was stored in the controller buffer or all controller buffer data was received by host.

Figure 2-5 I2C Transaction Frame
#### I2C Touch Protocol Each touch packet is maximum 64 bytes. Normally, there are 2 packets in one touch package. Host needs to read the package for input report retrieval. Each touch packet contains 2 bytes ”Length” and maximum 62 bytes data payload. The value of “Length” is calculated by 2 bytes for “Length” field and N bytes for valid input data in the payload


**Annotation** Gray block: From Host to Device White block: From Device to Host Address : 7 bits, touch device slave address (default 0x5C) S: Start Condition Length: PAYLAD length P: Stop Condition R: Host Read, bit 0 DATA: Input Data
#### I2C Touch Package Format The HID over I2C touch packet format is fixed length which depends on Report ID. While the touch event is happening, each touch packet will have maximum 5 touch data. If actual touch data is less than 5, the rest of touch data should be set zero in each touch packet for keeping the fixed length. There is no Cyclic Redundancy Check (CRC) in the HID over I2C touch packet format. 1st packet sends touch data from touch data0 to touch data4 with total touch count number in this touch package. 2nd package sends touch data from touch data5 to touch data9. 1st package
2 Bytes1 Byte4-9 Bytes6 Bytes1 Byte2 Bytes
Length FieldReport IDTouch Data()Touch Data4Touch CNTScan Time

2st package
2 Bytes1 Byte6 Bytes6 Bytes1 Byte2 Bytes
Length FieldReport IDTouch Data5Touch Data9Touch CNT = 0Scan Time

**Touch Data format** Take general 𝐼2C touch packet for example. General 𝑰𝟐𝐂 Touch Package Format


- Life: Report touch event - Death: Don’t report touch event. Take Customized 𝐼2C touch packet for example Customized 𝐼2C Touch Packet Format


- Customer application can get Palm or Eraser data format while the byte0 status is 0x1 and can be set it as Palm/Eraser function if needed by the application. Report ID Definition please refers to Appendix A. HID over I2C Touch Format Table please refer to Appendix B.

I2C Command Protocol

Command Protocol

  • Host Write - Host sends an output report to device for specific requests. The output report sending from host is maximum 64 Bytes, which includes 2 Bytes output register, 2 Bytes length field, and payload data.
  • Host Read - Device needs to parse the output report and then transmit the input report to host for response.

Host Write (Output Report)


**Annotation:** Gray block: From Host to Device White block: From Device to Host S: Start Condition Length: DATA length P: Stop Condition W: Write Host Read (Input Report)


**Annotation:** Gray block: From Host to Device S: Start Condition P: Stop Condition White block: From Device to Host Length: DATA length R: Read **Command Package Format** Hardware write: Host to Device
2 Bytes2 Bytes1 Byte1 Byte1 Byte1 Byte56 Bytes
Out RegisterLength FieldReport IDReservedCMDCRCPayload

**Command Package Format** Hardware read: Device to Host
Byte num2 Bytes2 Bytes1 Byte1 Byte1 Byte1 Byte56 Bytes
Device to
Host
Length
Field
Report IDCRC16ACK / NACKStatusPayload

### I2C CMD There are I2C command lists.
CMDCMD NameDescription
0x86Read Data CMDThis command is used when the host wants to read the device data from a
certain physical/virtual address (a3a2a1a0) with ReadLength (bytes).
0x85Change Mode CMDThis command is used for changing the device control mode by Type and
Mode.

I2C Format
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7ByteB8~B63
OUT
(Command
Report)
Output RegisterLength field
LSB/MSB
Report ID
(Appendix A)
Reserved
(0x0)
CMDCRC 16PAYLOAD



Note: (Following above table)
OUTCRC 16 = CMD + PAYLOAD, Length = 2(Length) + 4(byte4~7) + PAYLOAD
If it’s not through the Bridge Board, the Outer Register is 0x0004. Now we test through the Bridge Board, the Outer Register is 0x0140.
Touch
Report
If define *attribute will be enabled.
CRC 16 = Length field + Report ID + Finger Report + Touch Count + *Scan Time + *Function Key
Output: byte0~byte3 and Input: bypte0~byte1 is filled by OS, not our business

Finger Report Table:
Finger Report (Byte3 ~ 8)
StateToucht IDCoor X (LSB)Coor X (MSB)Coor Y (LSB)Coor Y (MSB)

#### I2C Response Format
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7B8~B63
ACKINLength field
(0x8)
ReservedReport IDCRC 160xEF0xBESTATUS
(Refer to STATUS table)
N/A
NACKINLength field
(0x8)
ReservedReport IDCRC 160xAD0xDESTATUS
(Refer to STATUS table)
N/A

STATUS Table:
Detect DevicePriorityError EventSTATUS
byte6(Master)byte7(Slave)
Master0ALL Pass0x000x00
1CMD0x000x01
2Length field0x000x02
3CRC0x000x03
4Address0x000x04
5R/W Length0x000x05
6Mode0x000x06
7SPI Program Fail0x000x07
8Report ID0x000x08
9Reset Success0x000x9
10Dev boot loader0x000x0a
Slave1CMD0x010x01
2Length field0x010x02
3CRC0x010x03
4Address0x010x04
5R/W Length0x010x05
6Mode0x010x06
7SPI Program Fail0x010x07
8Report ID0x010x08
9Reset Success0x010x09
10Dev boot loader0x010x0a

#### I2C CMD Introduction - 0x86 CMD: Read Data CMD
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7B8~B11B12~B13B14~
OUT0x040x000x0c0x00Report ID0x00x86CRC16a0~a3Read length
LSB/MSB
N/A
IN(0x8~
0x3c)
0x00Report IDCRC 16ACK/NACKSTATUSd0~d51
- 0x85 CMD: Change Mode CMD
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7Byte8Byte9
Byte10~
OUT0x040x000x080x00Report ID0x00x85CRC16Mode
Type
N/A
IN0x08
0x00Report IDCRC 16ACK/NACKSTATUSN/A

Cange Mode Table:
TypeModeTypeComment
Byte4Byte5
ENABLE_DIAGNOSIS_MODE0x210x01Flow control
DISABLE_DIAGNOSIS_MODE0x200x01Flow control
PWR_CMD_FWCTRL0x500x09Power mode control
PWR_CMD_ACTIVE0x510x09Power mode control
- A flow of 86 command execution

- 86 CMD Example: I. Read Rawdata ( RawDataAddr is 0x52 00 00 00 ) Length (Byte2 and Byte3): 0x000c (From Byte 2 to Byte 13)
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7B8~B11B12~B13B14~
OUT0x040x000x0c0x000x210x00x86CRC 160x520000000x4000N/A
In(0x8~
0x3c)
0x000x21CRC 160xef0xbe0x0000d0~d51
- 85 CMD Example: II. Force power to keep active(PWR_CMD_ACTIVE) Length(Byte2 and Byte3): 0x0008 (From Byte 2 to Byte 9)
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7Byte8Byte9Byte10~
OUT0x040x000x080x000x210x00x85CRC 160x510x09N/A
In0x80x000x21CRC 160xef0xbe0x0000N/A
III. Disable touch point (ENABLE_DIAGNOSIS_MODE)
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7Byte8Byte9Byte10~
OUT0x040x000x080x000x210x00x85CRC 160x210x01N/A
In0x80x000x21CRC 160xef0xbe0x0000N/A
IV. Let firmware control power (PWR_CMD_FWCTRL)
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7Byte8Byte9Byte10~
OUT0x040x000x080x000x210x00x85CRC 160x500x09N/A
In0x80x000x21CRC 160xef0xbe0x0000N/A
V. Enable touch point (DISABLE_DIAGNOSIS_MODE)
TypeByte0Byte1Byte2Byte3Byte4Byte5Byte6Byte7Byte8Byte9Byte10~
OUT0x040x000x080x000x210x00x85CRC 160x200x01N/A
In0x80x000x21CRC 160xef0xbe0x0000N/A