Professional Documents
Culture Documents
Microcontrollers
Table of Contents
1 Microcontroller ........................................................................................................... 3 1.1 1.2 1.3 1.4 1.5 2 3 Introduction ......................................................................................................... 3 Bus coupling units (BCUs) / Bus access units (BAUs) ....................................... 3 Principle of Operation of a Microprocessor ......................................................... 4 Differences between a Microprocessor and a Microcontroller ............................. 4 The Main Memory (ROM, Flash ROM, RAM, EEPROM) .................................... 6
The different KNX System Models ............................................................................. 7 Mask Versions of Bus Coupling Units ........................................................................ 8 3.1.1 3.1.2 3.1.3 BIM M 111 / BA1 (TP).................................................................................. 8 BIM M 13x ................................................................................................... 8 Chipset NEC 78K0/KE2 ............................................................................... 8
4 5
KNX Association
2/14
1 Microcontroller
1.1 Introduction
The subscribers to a network that is based on the OSI reference model are obliged to adhere to certain protocols. This means that they exchange their protocol data units according to agreed procedures. Seen from a technical point of view, such procedures can be executed very well by program-controlled electronic switching circuits. For many years now, microprocessors - and among those, especially the micro-controllers - have proved to be powerful, reliable and budget-priced components for use in exactly such network controlling applications.
further types of bus coupling units have been developed recently since standardised electronic components (chip sets) are now available which can be used to achieve communication between the bus and a controller in a very simple way. More information below! A bus coupling unit without a LED or pushbutton which is connected directly on the board is called a BAU. The types named above all have an 8 bit arithmetic logic. In order to understand the functioning of a bus device, it is essential to study the principle of operation of microcontrollers in general, and that of the MC68HC05B6 in particular, since all so far developed BCUs are based on that controllers system stack.
KNX Association
3/14
KNX Association
4/14
KNX TUTOR SEMINAR The following block diagram illustrates the principal components and flow of information on the MC68HC05B06 microcontroller.
KNX Association
5/14
KNX Association
6/14
System 1 Device Descriptor Max. Number of group objects Serial Number Access Control Interface-Objects no no no e.g. 0012 16
* The actual possible number of group objects depends on the capabilities of the individual microcontroller.
Below the system features shown in the table are described more detailed: Access Control: If access control is activated and you wish to access devices from the memory of BCU 2 (write and/or read), the tool must be authorised for this using a 4 byte key. Four access levels are supported (0=highest priority). Level 0: System access (reserved for manufacturers), Level 1: Loading of application programs (managed via ETS), Level 2: Tables and parameters (via ETS), Level 3: reserved (currently without function). A manufacturer can define up to 16 keys for a BCU 2 product: some of these are however reserved for system-related memory (e.g. access to the highest level 0) and for this reason are not revealed. These access control mechanisms can be used for the above device types from ETS2 V1.1 onwards. Access control does not refer to normal communication via group addresses: access is always enabled in this case. The exact handling of the access control is described in detail in the course chapter Application Program. Serial number KNX devices with mask version 2 or higher support a serial number: a different number is supplied with each BCU which makes it possible for example to program or read the physical address of a device without pressing the programming button. This number takes the form of a 6 byte code, divided into a block ID (2 bytes) and consecutive number (4 bytes).
KNX Association
7/14
KNX TUTOR SEMINAR Interface-Objects They enable access to the parameters and other properties of a device without direct memory access via memory read / write. The communication with interface objects is carried out via physically addressed telegrams. So one can open a window called property editor in the ETS add on tool Device editor, and read the interface objects of a bus device. You can find more about that in the chapter application program.
The Bus Interface Modules M 13x are based on the NEC microcontroller family 78K0/KE2. The BIM M13x-family has the following memory space:
Flash-Memory for Application program BIM M 130 / M 135 BIM M 131 BIM M132 8 Kbyte 16 Kbyte 48 Kbyte
RAM for Application and Objects 200 Byte 1,2 Kbyte 5,2 Kbyte
These controllers are programmed in C and fully support debugging in the program design phase. This enhances a speedy development. The operating system resembles the KNX profile 2.5. A BIM is integrated by the manufacturer in a KNX device. So this manufacturer only needs to develop the application specific hard- and software, not the operation system. A big advantage of the new BIM M13x family is that all these modules are pin compatible to each other and to the old series of the BIM M 111 / 113. So a manufacturer simply can replace the M 111 / 113 by a member of the new generation BIMs. He only needs to adopt the application software; the hardware will work as before. 3.1.3 Chipset NEC 78K0/KE2
A KNX chipset comprises all essential components of a BIM required for a time saving device development. It is better priced than a BIM and moreover allows the manufacturer to design his own style of printed circuit boards. The chipset NEC 78K0/KE2 resembles the microcontroller used on the BIM M13x and is already preconfigured with a certified KNX operating system in the on-chip internal FLASH memory. It is used together with a transceiver IC, also part of the chipset. So the responsibilities of the KNX manufacturer are reduced to the design of the application specific hardware and software.
KNX Association
8/14
This solution accommodates all the manufacturers who have already developed their own controller programs which they only need to adapt to the new protocol. The development is more cost-effective and KNX therefore becomes an attractive option in other fields of building technology such as in the HVAC sector. Boiler and pump manufacturers have previously refused to use the relatively expensive KNX bus coupling unit in their relatively cost effective components. With the TP-UART, they have a solution which represents good value and is already used by many manufacturers, also in the KNX easy mode segment. Whether a bus device contains a standard bus coupling unit or a TP-UART plus a controller is not determined in most cases as one of the three BCU types previously described is emulated by the controller e.g. it identifies itself as bus coupling unit mask 2.1 if it is analysed with ETS.
KNX Association
9/14
Figure 3: TP-UART: Interaction with the host controller in the OSI model
KNX Association
10/14
The information displayed is largely self-explanatory. You can see that the hardware and software PEI type must match so that the application program can run. Information about the manufacturer, program version and the objects plus group objects complete the device info! But: The test of the PEI type comes more and more out of fashion, since a compact device doesnt really require it. So different values for hard- and software types dont necessarily mean malfunction!
KNX Association
11/14
Differences between BCU 2 and BCU 1: Serial number Download status display for program, address table and associations (objects group addresses) No indication of the software PEI type No bus voltage reading Read without group addresses the display is identical with other readings of different BCUs!
KNX Association
12/14
Differences to BCU 1 and BCU 2: 2 programs can run, namely the so-called PEI program can run in addition to the standard application. In the above case, there is no program. To determine whether the device functions correctly, you must refer to the description from the manufacturer or ask at his help desk.
KNX Association
13/14
The indicated data are retrieved using Property Read telegrams. Difference to a normal BIM M112: additionally the hardware type and the firmware version are shown, but the bus voltage is dropped. This feature is more and more omitted due to efforts reducing the design costs.
KNX Association
14/14