Touchscreen Emulation for the Video Dragon 2 based on I²C Slaves

Introduction 

The Video Dragon 2 is commonly used as a frame grabber for the analysis and validation of embedded displays. In addition to pure video capture, the platform also provides the ability to emulate user inputs. By utilizing its integrated I²C slave interfaces, a connected touch controller can be simulated, enabling automated GUI testing without the need for physical touch interaction. Basic Principle Many modern displays communicate with the host system through two independent interfaces:

  • Video interface (LVDS, MIPI CSI-2, MIPI DSI, OpenLDI, etc.)
  • Touch interface (typically I²C, but also CAN or Ethernet)

While the Video Dragon 2 captures and processes the video stream, its I²C slave interfaces can be used to emulate a touch controller or other I²C devices. The target system recognizes the Dragon as a regular touchscreen controller. This allows the generation of various touch events, including:

  • Single touch
  • Drag & Drop
  • Swipe gestures
  • Multi-touch interactions
  • Automated operating sequences

Touch Coordinate Simulation 

The emulated touch data is provided through the I²C slave interface. The host system reads the registers exposed by the Dragon and interprets them as touch coordinates. The following information can be transmitted, for example:

  • X coordinate
  • Y coordinate
  • Touch status (Pressed / Released)
  • Number of active touch points
  • Gesture information

The behavior can be adapted to support different touch controller protocols. GPIO-Based Interrupt Simulation Many touch controllers use an additional interrupt line to signal the availability of new touch data. This behavior can also be reproduced with the Video Dragon 2:

  • Touch data is updated in the I²C slave registers.
  • A Dragon GPIO output is then toggled.
  • The GPIO simulates the interrupt signal of the original touch controller.
  • The target system responds to the interrupt and reads the touch data.

As a result, the DUT (Device Under Test) experiences fully realistic touchscreen behavior. Integration with the Frame Grabber A key advantage of the Video Dragon 2 is the combination of:

  1. Touch input simulation
  2. Display content capture
  3. Automatic image analysis

This enables fully automated testing of the complete graphical user interface. Integration into Dragon Suite For seamless integration, a software library (DLL) can be created to encapsulate the required touch functions. Typical functions provided by the DLL may include:

  • TouchDown(x, y)
  • TouchMove(x, y)
  • TouchUp(x, y)
  • Swipe(x1, y1, x2, y2)
  • MultiTouch(...)

Using a template DLL, touch emulation can be integrated directly into Dragon Suite. Touch events can then be triggered conveniently from within the graphical user interface. For example, in the frame grabber dialog, users can click directly on the live image. The corresponding touch coordinates are automatically transferred to the target system through the I²C interface. Optionally, a GPIO can be controlled to simulate the touch interrupt signal. The DLL can also be integrated into existing test environments, allowing touch simulation to be controlled through HIL systems or NI TestStand. Benefits of DLL Integration

  • Reusable touch simulation library
  • Unified operation through Dragon Suite
  • Support for complex test sequences
  • Easy extension for custom touch controller protocols
  • Combination with existing image analysis functions

Typical Applications

  • Menu verification
  • Navigation testing
  • Automation of user interaction workflows
  • Regression testing
  • Smartphone displays
  • Industrial control panels
  • Medical devices
  • Household appliances
  • Touchscreen functional testing
  • Automatic calibration
  • Operator-free usability testing

Conclusion

By leveraging the I²C slave interfaces of the Video Dragon 2, a touchscreen controller can be fully emulated. Combined with GPIO-based touch interrupt simulation, the system provides a realistic representation of a physical touch interface. Together with the frame grabber capabilities of the Video Dragon 2, this enables powerful closed-loop testing scenarios where touch inputs are generated and their effects are immediately verified through image analysis. Using a template DLL, touch emulation can be integrated directly into Dragon Suite, providing a convenient and scalable solution for automated HMI and GUI testing.

Here is a template how to integrate you touch simulation to a library for Dragon Suite

×
Vous avez besoin d'aide ?

Contactez nous !

Support Hotline Germany