Page tree
Skip to end of metadata
Go to start of metadata

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

USB Raw HID Mode

The sensor 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 is set in the operation mode called 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 over USB Raw HID mode.

  1. Power on the sensor.
  2. Wait for the OS to enumerate the device and then enumerate the sensor 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 to the correct operation mode (detection mode) by sending a Feature Report with report id 1.

  4. Wait for the sensor 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.

The sensor is now ready to communicate. After the procedure, the sensor 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 sensor over Feature Report 1 and 2 refer to USB HID Transport.

I2C

Use the following procedure to prepare the sensor over I2C.

  1. Power on the sensor.
  2. Wait for sensor 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 is now booted.

  5. To enable the sensor 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 sensor is now ready to communicate. When DR is asserted the sensor will send a touch notification or a new BootComplete. A BootComplete indicates that the sensor has restarted for some reason; Enable must then be set again. For more details, refer to I2C Transport.


Read More on Software Integration

Read More