Building automation based on KNX – BIMs: The development toolpackage

Using a bus interface module for developing new smart home appliances which conform to the KNX-standard is easy and comfortable.

The family members of the BIM M13x series provide for the developer the hardware needed for connecting the new device to any KNX-bus using a twisted pair as physical layer. Moreover, the features of the pre-installed firmware (BCU 2.5) are accessible through an easy-to-use Application Programming Interface, so that the communication with other KNX-devices may be implemented fast and efficient.

The advantage is not only, that the developer has more time to invest in the development of the application specific hardware and software, but also that the hardware needn’t be built from scratch. The microcontroller of type NEC 78K0/Kx2, the Physical External Interface, one 8-bit I/O port and two PWMs are provided to be used by the application program.

In order to shorten development and debugging times, an Evaluation Board with the functionality of the largest family member, BIM M132, is provided by Siemens. The Evaluation Board is delivered by Opternus GmbH with full development toolpackage.

Though, the following aspects should be considered before ordering:

  • the evaluation board is only working when connected to a power supply which conforms to the KNX-specification (~29 VDC)
  • the application program can only be downloaded to the board via the KNX-bus
  • the development environment delivered in the package, IAR Embedded Workbench, is a limited size version (refer to the IAR website for more information)
  • the NEC Minicube 2 development platform, for online debugging and for downloading the firmware to the board, will not work under Windows 7

Preparing the toolchain

In the delivered package is, of course, also a Getting Started booklet included. This should help at installing all the tools, and making the system work. Well, in my case it wasn’t that easy: 

  1. I was not able to use the NEC Minicube 2 on Windows 7, I had problems with installing the driver. Preparing a virtual machine with Windows XP x86 should handle this problem.
  2. Installing the Minicube2 driver should be done as described in the Read Me!. The prepared virtual machine (Step 1)  should be used, if Windows Vista / 7 is installed on the host system.
  3. The “IAR Embedded Workbench for 78K” may be installed on Windows 7 or Windows XP, it will work on both systems without problems.  Though, installing it on the virtual machine has the advantage, that the VM can be easily restored to an earlier restore point, so that the IAR EW can be used with full functionality for a longer period of time.
  4. The BIM Tools should be installed on the host system, as connection problems with the KNX-bus may occur, if installed on the virtual machine.
  5. Although not mentioned in the Read Me! booklet (only in other documents), the Falcon Environment must also be installed. It is free of charge and can be downloaded from, but only via KNX Online Shop account. The Falcon Driver Library guarantees the access of the BIM Tools to the KNX-bus.

Downloading the firmware to the emulator

At this point  all the needed software should be installed, and ready to work. The next step is building up the connections and downloading the needed firmware (BIM M130/M131/M132/M135) to the board.

Build the connections as shown in the figure:

  • Connect the EVB to the Minicube 2. Do NOT forget to also connect the 20 MHz external oscillator included in the package. Although explicitly mentioned in the booklet, do NOT remove it, if already mounted. At least in my case, it did not work without. The ID78K0-QB tool did only recognize the board, in my case, when the external oscillator was mounted.
  • The EVB is powered through the KNX-bus, so this connection must also be built.
  • The last step is connecting the Minicube 2 to the PC through an USB port.

For downloading the firmware to the board, the ID78K0-QB tool needs to be used. When opening the application, the first thing is establishing the connection between EVB and ID78K0-QB. A working configuration is shown in the figure below:

If the communication with the EVB is successfully established, the window disappears, and the drop-down menu can be used. If a problem with the communication occurs, an error message is displayed. The manufacturer provides a recovery document, in case things don’t go well, which can be downloaded from here.

In case everything went well, choose File -> Download, and select the needed object code (*.hex) file, provided on the attached CD (Folder name: HexFilesForDebug). The download process lasts for about 30 seconds.

Now the board is prepared to run the application program.

As mentioned in the Getting Started booklet, use a jumper to create a short on JP6, so that the programming LED is connected to the programming button.

Disconnect the EVB from the Minicube2, and push the programming button. The programming LED should be lighting now.

In the next article I will explain, how I’ve managed to create and download my very first application program.


The source of the picture illustrating the connections is

Add Comment

Your email address will not be published. Required fields are marked *