Case Studies
Specialization
Electronic products design / Markets / HDMI-CEC Controller

HDMI-CEC Controller

Stellaris LM3S6965 Evaluation BoardCustomer

Incyma – Swiss company specializing in developments in the sphere of control devices and automation of “smart house”.

Objective

Develop a device prototype allowing controlling home multimedia complex (home theatre, expanding list of devices, tuners, video recorders) with HDMI-interface via Ethernet by using a PC or other devices connected to Ethernet. The device must be quickly and easily configured and integrated to the complex of “smart house” control.

CEC line in HDMI cable allows transmitting commands and controlling signals from one remote control to different devices of home theatre and it also provides their independent interaction. There are the following commands: switch on/off, play, sleep mode, recording and others. This line was accepted by many manufacturers as a standard, which allows controlling equipment of any other manufacturer by any compatible remote control.

Solution

CEC protocol analysis showed that it is not necessary for a controlling processor to have neither high performance nor developed periphery. The only key requirement is availability of Ethernet (MAC+PHY). The optimal variant is to choose LM3S6965 microcontroller based on Cortex-M3 architecture.

Device prototype was developed on the basis of Stellaris® LM3S6965 Evaluation Board. Controller’s software is based on multitasking library, which allows simplifying program architecture and using independent program modules.

CEC  Ethernet Bridge windowOne of the main tasks of the developed built-in software is accepting and decoding commands coming from CEC line. Another main task is TCP/IP stack support. In this case we chose ready solution - uIP stack – as it requires minimum resources. This stack already supports many network protocols and for this objective their number was significantly increased. At this moment, the device uses the following protocols:
  • HTTP – the device provides the user with a web-page with the list of detected devices and with minimal control interface;
  • Telnet – the main protocol, by using which a smarter device or user can “see” all commands between home theatre components, and also they can give commands for execution;
  • SNTP – for automatic time setting via the Internet;
  • IPv4LL, DHCP, NetBIOS, mDNS – a group of protocols for addressing and identifying a network device. mDNS (Apple Bonjour) protocol must be specially noted, as it allows identifying a device without knowing either its name or address.
Moreover, developers implemented a function for updating device’s firmware directly from the Internet!

As a separate task of the device our specialists implemented Lua language interpreter. Such solution allows writing a script that will perform command sequences, which will be adapted for every specific case. So, for example, the device can switch on DVD-player to play music at the specified time, gradually increase volume, and at the specified time switch TV to a certain program, etc.

Benefits

  • The usage of a controller with integrated controller and Ethernet physical layer allowed decreasing development costs and size of the device;
  • Application of script language expands capabilities of device configuration;
  • The fact that firmware can be updated automatically via the Internet allows the user to change scenarios of device behaviour by simple downloading of new script.
Development tools
CrossWorks 1.7
Technologies Ethernet, uIP, mDNS, CEC, Telnet, Lua
Programming languages C
Project management tools dotProject, SVN
Labor input
70 man-days
Project completion period 3,5 months

Download PDF - 140Kb