EEPROM and controller firmware functions

Some pointer device controllers have on-board EEPROM (Electrically Erasable Programmable Read Only Memory). EEPROM can be used to store information pertinent to the controller and also offers a memory storage area for applications and drivers to store data.

The UPDD driver can access EEPROM for a number of reasons:

  1. To store UPDD calibration data, so that calibration data is held against a specific device.
  2. To update or read controller internal settings.
  3. To read controller data for display, such as the firmware revision.
  4. To update the controller's firmware.

This document describes these functions for UPDD 6 and UPDD 7. EEPROM functions are only available for the controllers listed below, as and when they have been requested.

Calibration storage

In all cases an absolute pointer device needs to be calibrated with the system's video display, such that the point of contact is aligned with the video image. For HID controllers the driver reads the co-ordinate range from the HID Report Descriptor and scales this to the display's video resolution, and in most cases this gives very accurate calibration. A manual calibration procedure can be performed if this automatic procedure does not give accurate calibration, or if co-ordinate data is incorrect or not available from the controller, such as in the case of non-HID devices.

Calibration data is normally stored locally in the driver's settings file. However, there are cases where it may be desirable to store calibration data externally. This is especially true of systems where the calibration data cannot be stored locally, such as embedded system configurations where the entire system is locked down and any changes made are lost when the device is powered off. In other cases it is desirable to calibrate a touch screen prior to usage on a similar system, so that it is calibrated when first used and will only require recalibrating if the EEPROM calibration is inaccurate.

With the vast majority of modern touch controllers being HID compatible, whereby the co-ordinate range is read from the controller, EEPROM calibration storage is less significant and rarely required.

By default UPDD calibration data is held in the UPDD database file. Initial calibration data is calculated from the co-ordinate range held in the HID Report Descriptor for HID USB devices, or can be embedded in the installer program as taken from a good calibrated system that uses the same device. Systems that are not calibrated after install require calibrating.

EEPROM calibration data is only really useful where the OS or system is locked down and the file system does not allow any files to be updated, or where devices are shared or used on different systems and it is useful to have the calibration data stored on the device. If neither of these is the case then, even if the device is capable of storing calibration data, it only duplicates the data already held in the UPDD database and introduces an extra step of writing and reading EEPROM, with read failures and slow transfer rates to cater for.

EEPROM calibration types

EEPROM calibration falls into two distinct categories:

MethodDescription
FirmwareUPDD calibration invokes the controller's firmware calibration commands to perform calibration, such that scaled touch co-ordinates are delivered when the device is in use.
In most cases the calibration function implemented within the controller's firmware dictates the number and location of the calibration points, and this will be reflected in the available settings on the calibration dialog. Following calibration the controller's output is adjusted to map to the video display; the generated co-ordinate data is "pre-calibrated" and therefore a retrieval process is not relevant.
StorageUPDD native calibration storage, whereby the UPDD calibration data is stored in the controller's EEPROM for later retrieval.

EEPROM calibration is implemented in UPDD by specific EEPROM protocol code written for each controller. When a controller is defined in our controller production system we indicate the EEPROM protocol id to use to enable EEPROM functionality. The protocol id also indicates which EEPROM method to use, Firmware or UPDD native calibration storage.

Enabling EEPROM protocols

The protocol ids are shown below. EEPROM is supported on USB devices; it is not supported on serial devices. Most EEPROM testing is carried out in Windows; only the protocols marked tested are known to work.

Controller nameProtocol idPortTypeStatus
Microchip, TSharctsharc-usbUSBNativeTested
Zytronic x,yzytronic-usbUSBNativeUntested
Zytronic zxy100zxy100-usbUSBNativeUntested
Microchip, AR1xxxar1xxx-usbUSBNativeUntested
TRS (non HID)trsUSBNativeTested
TimelinktimelinkUSBNativeUntested
Elosmartset-usbUSBFirmwareTested

The protocol id is stored in the device setting eeprom.protocol and can be set using the command upddutils [device n] set eeprom.protocol [protocol id], e.g. upddutils device 1 set eeprom.protocol tsharc-usb to enable EEPROM support for a Microchip TSharc controller that supports EEPROM.

The device setting eeprom.calibration_on indicates if EEPROM calibration is enabled: 0 = disabled, 1 = enabled. To enable or disable it use the command upddutils set eeprom.calibration_on 1 (or 0). It can also be set in the UPDD Console calibration dialog, which shows the option when the EEPROM protocol id is correctly defined.

With EEPROM calibration enabled, calibration data is stored in EEPROM and is read at device enumeration time, that is at system start and on new device connection. The settings eeprom.calibration.readstatus and eeprom.calibration.writestatus indicate the success or otherwise of the EEPROM reads and writes.

Elo SmartSet (firmware calibration)

The Elo SmartSet firmware interface requires that the number of calibration points be set to 3. In theory any margin can be used, but in practice it would appear that 0% is necessary.

UPDD data storage requirements

The UPDD EEPROM framework requires the following amount of storage: number of points x 4 + 22 bytes.

4 points needs 38 bytes
9 points needs 54 bytes
25 points needs 122 bytes
16 bytes are reserved for future use.

We also store the video resolution of the associated monitor. This requires a further 4 bytes.

Viewing EEPROM calibration data

The upddutils option calibreport shows additional information for a controller with EEPROM support: it lists the protocol id (in this example tsharc-usb), indicates if EEPROM is enabled and shows the EEPROM content.

Specific commands to read and write EEPROM data, readeeprom and writeeeprom, are described in the upddutils command line reference.

Controller functions

These controller functions have been implemented to adjust settings for specific controllers.

TPK/Weida functions

We have implemented a function to update the touch sensitivity (threshold) of the controller using the UPDD command line interface.

The device setting eeprom.protocol is used to define the protocol. This must be set to tpk (or weida). This can be predefined in the software or set via the command upddutils set eeprom.protocol tpk.

With this in place the command upddutils tpkset touch_threshold nn (or weidaset) can be used to set the desired threshold value:

For the command to work under UPDD 7 the device must be using the UPDD HID filter interface (device setting device_class = hid).

TRS non-HID USB controller

A number of firmware related functions have been implemented for the TRS non-HID controller, and they are available in UPDD 6 and UPDD 7. Most of these functions have been implemented with an equivalent UPDD API. Should you be advised how to use these functions at an API level you will need a TRS specific header file, which can be supplied on request.

The device setting eeprom.protocol is used to define the protocol. This must be set to trs. This can be predefined in the software or set via the command upddutils set eeprom.protocol trs.

With this in place the upddutils commands listed below can be used as instructed by TRS:

In this example the trsget command is used to return the firmware version:

Zytronic HID devices

Implemented in UPDD 7 only. Two commands get and set various settings within the Zytronic HID device.

CommandUsage
zxygetsettingsupddutils zxygetsettings shows all settings and their current values:
zxysetsettingupddutils zxysetsetting sets an individual setting, e.g. upddutils zxysetsetting threshold 25

The device must be using the UPDD HID filter interface (device setting device_class = hid).

Firmware page in the UPDD Console

The UPDD Console Firmware function is only shown on systems where the Console can be used to interface with the settings within the touch device or monitor, and is only available in some very specialised driver installations.

This option is only shown in UPDD 7. For HID compatible devices the device must be set to use the HID filter driver interface (device_class = hid), and the global setting firmware_page set to the desired firmware page.

Zytronic ZXY100 firmware page

This table shows the device firmware page available and its settings:

SettingDescription
Zytronic, ZXY100, USBThe UPDD global setting firmware_page must be set to zxy100-usb for the firmware page to show.
Coarse SensitivityThe coarse sensitivity can be changed between Option 1 to 4. This should be initially used to set the overall coarse sensitivity of the sensor, with the different options relating to the sensor glass/overlay glass thickness used (guideline glass thickness is displayed in millimetres alongside each option). Increasing the coarse sensitivity will make the touch sensor more sensitive to an applied touch.
ThresholdThe threshold control can then be used to set the fine sensitivity of the sensor. The threshold can be changed between a value of 12 and 100. Increasing the threshold will make the sensor less sensitive to an applied touch, and decreasing the threshold value will make the sensor more sensitive to an applied touch.
Note: the threshold control has the inverse effect to that of the coarse sensitivity control.
Force equalisationForces the touch screen controller to normalise all the wire levels within the sensor and take these normalised levels as new reference values for processing information.
Reset ControllerInitiates a reset of the touch screen controller. After execution the controller may take a few seconds to re-establish full operation to an applied touch.
Restore factory defaultsRestores the factory default settings of the touch screen controller.