The following procedures are required to prepare a sensor module for communication with I2C or USB Raw HID mode.

USB Raw HID Mode

The Touch Sensor Module has a setting called operation mode, that determines which data will be sent to the host. When communicating over USB there are two different operation modes that deliver touch data, called detection mode and detection mode HID. By default, the sensor module is set in the operation mode detection mode HID. This mode delivers touch data to the operating system according to the HID standard for touch screen devices. In order for the host to receive touch data that is serialized according to Neonode's ASN.1 serialization protocol, the operation mode has to be set to detection mode. In other words, setting the operation mode to detection mode allows the host to receive touch data over USB Raw HID mode.

Do the following procedure to prepare the sensor module over USB Raw HID mode.

  1. Power on the Touch Sensor Module.
  2. Wait for the OS to enumerate the device and then enumerate the sensor module in your application. Depending on which operating system that is used, the application might need permission from the operating system to access the device.

  3. Set the sensor module to the correct operation mode (detection mode) by sending a Feature Report with report id 1.

  4. Wait for the sensor module to signal that there is data to read. This comes as an Input Report 2 or you can poll Feature Report with id 2 for new data.

  5. Read the response data from Feature Report with id 2. The data that is read reflects the current setting in the sensor module.

The Touch Sensor Module is now ready to communicate. After the procedure, the sensor module is enabled by default and will start sending ASN.1 serialized touch notifications. To disable the touch notifications, a Disable request must be sent. Refer to zForce Message Specification for examples of requests, responses and notifications.

For further details on how to communicate with the Touch Sensor Module over Feature Report 1 and 2 refer to USB HID Transport.

I2C

Use the following procedure to prepare the Touch Sensor Module over I2C.

  1. Power on the Touch Sensor Module.
  2. Wait for sensor module to assert Data Ready pin (DR).
  3. Initiate 2 byte I2C read operation. Payload of this read should be EE XX where XX is the amount of bytes to read in a second I2C read operation.
  4. Read XX amount of bytes (number of bytes to read is indicated by second byte of first I2C Read Operation). Now read a message called BootComplete. The message should be

    F0 11 40 02 00 00 63 0B 80 01 YY 81 02 03 YY 82 02 00 YY

    where YY is usually "00" but can have another value. This signals that the sensor module is now booted.

  5. To enable the Touch Sensor Module to start sending touch notifications, do the following:

    1. Send an Enable command:

      EE 09 40 02 02 00 65 03 81 01 00
    2. Read the response. The response should be:

      EF 09 40 02 02 00 65 03 81 01 00

The Touch Sensor Module is now ready to communicate. When DR is asserted the sensor module will send a touch notification or a new BootComplete. A BootComplete indicates that the sensor module has restarted for some reason; Enable must then be set again. For more details, refer to I2C Transport.