C-Control

from Wikipedia, the free encyclopedia

The C-Control microcontroller module is produced and marketed by the electronics company Conrad Electronic . The microcontroller series, which has been in production since 1994, is now sold in different versions. In addition to a standard and compact version (M Unit) based on a Motorola (since 2004 Freescale ) MC68HC05B6 controller, the successor generation of the C-Control I M-Unit in the form of the C-Control I M-Unit 2.0 has also been available since mid-2004 68HC908GT16 and C-Control I Micro 68HC908QT4CP sold. The C-Control II, which has been available since the end of 2000, is a new development, which was supplemented by a third C-Control version, the C-Control Pro, in mid-2005. The C-Control is mainly used because of its simple handling, the numerous accessories and the large range of German-language literature.

The C-Control M Unit 2.0 (right) in size comparison with the C-Control Micro
The C-Control I Station 2 in use with a top hat rail relay box
C-Control Pro with switching relay extension. Next to it is the developer board.

Controller versions

C-Control I

Version 1.x

Before 1996 there was a C-Control I version 1.0, which, however, is not compatible with the C-Control I V1.1 versions released after 1996. In 1996 the C-Control I version 1.1 came onto the market, which could now be programmed not only in the graphic programming language CCPLUS, but also in the BASIC dialect CCBasic.

The C-Control I Version 1.1 is available as a "large" C-Control I Main Unit, as a C-Control I M-Unit and a C-Control I Station. Common abbreviations for the C-Control I V1.1 are "CC1", "CC1 V1.1".

The C-Control IM-Unit 1.1 is no longer available. The C-Control IM-Unit 1.2 is available as a replacement. However, it is based on the hardware of C-Control I Version 2 and is not 100% compatible.

Alternative controller

In the meantime, alternative controllers have also been developed that are compatible with the token interpreter of C-Control I version 1.1, so that these a. can also be programmed with CCBasic. At the beginning of 2004 the CC1-OS project was discontinued. The project pursued the goal of expanding and optimizing the C-Control I. Other alternatives are the highly CCBasic-compatible Open-Micro, Open-Mini, Open-Midi, Open-Macro and Open-Maxi from Dietmar Harlos, as well as the B-Control (based on Atmel Atmega32 / 128) from Martin Kaup to select.

Version 2.x / 1.2

Standard design

The next generation of the C-Control I version 1.1, the C-Control I version 2.0, has also been available since mid-2004. The aim of the new controller is to maintain the greatest possible compatibility with the old C-Control I version 1.1. In addition to the C-Control I M-Unit 2.0, the C-Control I Micro was also released. The Micro is a single chip that can run without external wiring. After initially there was no possibility for the user to create his own assembler routines , this is now also possible for these controllers with restrictions with a special CCASM assembler . These restrictions consist of blocking certain OP codes and replacing OP codes with macros, which are intended to prevent the operating system from being accessed and read out via assembler code. The assembler routines are also “signed” and encrypted to prevent anyone other than the CCASM from being used.

The C-Control I Version 2 is available in the versions C-Control I M-Unit V2.0, C-Control I M-Unit V1.2, C-Control I Station V2.0 and C-Control Micro.

Designations used, such as "M-Unit 2", "M-Unit 2.0", C-Control 2.0, often lead to a mix-up with the C-Control II, which u. a. also bears the official designation "C-Control 2".

As the microcontroller used has already been discontinued by the manufacturer, the end of the availability of this standard version is foreseeable.

Advanced version

The C-Control I M-Unit Version 2.0 and C-Control I Station V2.0 have also been available in an extended version since 2008. In addition to 22 kbytes of program memory and 240 bytes of user RAM, the so-called advanced versions support 32-bit floating point arithmetic.

C-Control II

Additionally, there is (also called C-Control 2 or CC2) C-Control II since the end of 2000 based on the Infineon -16- bit - microcontroller C164CI . The C-Control 2 has only the name in common with the C-Control I. Due to the multithreading, the existing possibility of string processing, 32 bit long integer , as well as the 64 bit floating point arithmetic and the very large memory for a microcontroller (64 kB RAM, 512 kB flash), the C-Control II is still the most extensive Variant. Larger assembler routines (up to 192 kB of Flash) can also be integrated.

The C-Control II is available in the versions C-Control II Main-Unit (also called CC2-Unit) and C-Control II Station (also called CC2-Station).

C-Control Pro

In 2005, the C-Control series was expanded to include the C-Control PRO family. Compared to the C-Control-I family, these units have significantly more memory and hardware resources. Without external extensions, 2 kB (MEGA32) or approx. 2.6 kB (MEGA128) RAM, approx. 15 kB or approx. 110 kB Flash for user programs, and 1 kB or 2 kB EEProm memory are available. The C-Control-PRO family is based on the RISC microcontrollers of the same name from the Atmel AVR family . The MEGA128 offers significantly more I / O resources than any other C-Control that has appeared so far if no external RAM expansion is used. The C-Control Pro offers multithreading, similar to the C-Control II. Programming can be done in Compact-C or Basic. Both programming languages ​​can be mixed, so one part can consist of Compact-C and the other part of the software of Basic. Since it is a modular programming system, even larger projects can be managed relatively easily. As with the C-Control II and the C-Control I under Basic ++, universal modules only need to be programmed once and can thus be reused. However, the C-Control IDE does not contain a simulator, as with C-Control I and C-Control II, but instead has a hardware debugger .

Applications

With the C-Control, simple automation processes can be implemented for private as well as semi-professional areas. The C-Control IM-Unit 2.0 achieves an execution speed 38 times higher than the previous version. Dealing with the I²C bus, external components and LC displays has also been simplified.

The C-Control II is even used very often in the professional sector. A wide variety of hardware can be integrated in the simplest possible way through extensive program modules. It is also very popular in home automation, as a controller has sufficient resources to control or regulate everything here. When choosing the controller, the execution speed often plays an important role. Various tests of benchmarks have shown, however, that a speed comparison of the current controllers depends very much on the application and thus on the resources made available by the controller. In principle, the individual C-Control families are not directly comparable with one another, as a. the functionality of the individual operating systems differs too much.

Each C-Control variant therefore has its advantages and disadvantages.

programming

C-Control I

The C-Control I software CD from CONRAD for programming the C-Control I contains the programming languages CCBASIC and BASIC ++ (as the main component of the WorkBench ++ development environment). Alternatively, mBasic, the C -like language CCCCC or the downward compatible OCBASIC developed for the Open Control project can also be used for C-Control I version 1.1 .

The C-Control I version 1.1 can also be programmed in assembler . For the C-Control IM-Unit 2.0 and C-Control Micro, however, a special assembler called CCASM is required, since only programs signed with CCASM can be started on the new C-Controls.

 Main() ' Das ist ein Kommentar

 FUNCTION Main()
  DEFINE i AS BYTE
  DEFINE MeinString AS STRING * 10

  LCD.INIT
  LCD.CLEAR
  FOR i = 1 TO 10
   MeinString = "Wert von i = " & STR(i)
   LCD.PRINT MeinString
  NEXT i
  LCD.OFF
 END FUNCTION

C-Control-I-Version-2.0 example in BASIC ++ with dynamic strings and LC display output

C-Control II

The more powerful C-Control II, on the other hand, is programmed with the C2 programming language. However, assembler routines can also be easily integrated here. Direct programming of the C-Control II without an operating system is also easily possible. The operating system can be reloaded at any time.

 thread main
 {byte second;
  stports.init();
  stports.LCDlight(1);
  lcdext.init();
  lcdext.print("Hello World");
  second=system.second();

  loop
  {
   lcdext.line(2);
   lcdext.time(0);
   stports.togLED(1);
   sleep 490;
   stports.togLED(1);
   wait system.second()!=second; //Auf Sekundenwechsel warten
   second=system.second();
  }

 }

C2 example with LC display output on a C-Control II station (clock with LED flashing every second)

 thread main
 {byte second;
  lcdext.init();
  lcdext.print("Hello World");
  second=system.second();

  loop
  {
   lcdext.line(2);
   lcdext.time(0); //Aktuelle Zeit ausgeben Format: 2=hh:mm:ss
   sleep 500;
   lcdext.goto(2,2);
   lcdext.put(' '); //Doppelpunkt mit Leerzeichen überschreiben
   lcdext.goto(2,5);
   lcdext.put(' ');
   wait system.second()!=second; //Auf Sekundenwechsel warten
   second=system.second();
  }

 }

C2 example with LC display output for a C-Control-II-Unit with external LCD (clock with colon flashing every second)

C-Control Pro

Like the C-Control I & II, the C-Control Pro contains a pre-installed token interpreter, which is automatically updated when a program is downloaded. In contrast to the C-Control I, the tokens can be compiled not only from a BASIC but also from a C source code, and even mixed. However, in contrast to the B-Control, which is also based on ATmega microcontrollers, the C-Control Pro is not compatible with the C-Control I.

 Dim Text(9) As Char                     'Char Array
 Dim X As Word                           'Zählvariable
 LCD_Init()                              'LCD high-level initialisierung
 LCD_ClearLCD()                          'LCD löschen
 LCD_CursorOff()                         'Cursor ausschalten
 Text = "X:"                             'String übergeben
 Do While True                           'Endlosschleife
   LCD_Locate(1,1) : LCD_WriteText(Text) 'Schreibe an Position 1,1 des LCDs das Char Array
   LCD_Locate(1,3) : LCD_WriteWord(X,4)  'X wird vierstellig an Position 1,3 am LCD ausgegeben
   X = X+1                               'Zählervariable um eins erhöhen
   AbsDelay(100)                         'kurze Pause
 End While                               'Schleifenende

C-Control PRO example code to output a counter value in Basic

    word n;
    char num[8];
    LCD_Init();                     // Display initialisieren
    LCD_ClearLCD();                 // Display löschen
    LCD_CursorOff();                // Display Cursor ausschalten
    for (n=0; n<256; n=n+1)
    {
        Str_WriteWord(n,16,num,0,2);// Wort n in ASCII String konvertieren
        LCD_CursorPos(0);           // LCD Cursor positionieren
        LCD_WriteText(num);         // String num ausgeben
        AbsDelay(100);              // Verzögerung um 100ms
    }

Output on an LCD in Compact-C

Overview of the programming languages ​​used

programming language Target platform Output format Syntax / paradigm Data types Strings / arrays Stack processing restrictions
CCBASIC C-Control I version 1.1 Bytecode / machine code BASIC ( imperative ) Byte (8 bit), Word (16 bit) no firmly Max. 6 kB (without DLL patch)
CCPLUS C-Control I version 1.1 Bytecode graphically Byte (8 bit), Word (16 bit) no firmly Max. 6 kB (without DLL patch)
GegeC C-Control I version 1.1 Bytecode C ( modular ) Char (8 bit), Int (16 bit) no firmly no
OCBASIC Open-Control, C-Control I version 1.1 Bytecode / machine code BASIC ( modular ) Byte (8Bit), Word (16Bit) no firmly no
AS05 C-Control I version 1.1 Machine code Assembler ( imperative ) 8 bit no dynamic no
BASIC ++ C-Control I version 1.1, C-Control I version 2.0 Bytecode BASIC ( modular ) Byte (8 Bit), Word (16 Bit), Float (32 Bit), String (64 Byte) Strings, ( EEPROM ) ChipRam, arrays fixed (optional dynamic) no
CCASM C-Control I version 2.0 Machine code (encrypted) Assembler ( imperative ) 8 bit no dynamic Code is authorized, no free access to all resources, only 2 pages of 248 bytes each possible
C2 C-Control II Bytecode / Wordcode simplified C ( modular ) Byte (8 Bit), Int (16 Bit), Long (32 Bit), Float (64 Bit), String (32 Byte) Strings, arrays, own data types dynamic no
CompactC C-Control Pro Bytecode C ( modular ) Char / Byte (8 Bit), Word / Int (16 Bit), Float (32 Bit) Strings, arrays dynamic no
basic C-Control Pro Bytecode BASIC ( modular ) Char / Byte (8 Bit), Word / Int (16 Bit), Single (32 Bit) Strings, arrays dynamic no

The supported data types, the possibility to work with strings and arrays and the stack processing are essentially determined by the operating system implemented on the microcontroller.

Overview of technical data

Controller operating system Tact Program memory ASM memory Data storage User RAM I / Os * ADC Reference voltage PWM
C-Control I version 1.1 Single threading 2 MHz 8 kB 0.249 kB 8 kB (= program memory) 24 bytes 35 8 bit 2.5V - 5.0V 2
C-Control I version 1.2 Single threading 2 MHz 9.5kB 0.5 kB (= program memory) 9.5 kB (= program memory) 64 bytes 29 8 bit 5.0V 2
C-Control I version 2.0 Single threading 8 MHz 9.5 kB 0.5 kB (= program memory) 9.5 kB (= program memory) 140byte 29 8 bit 5.0V 2
C-Control I Version 2.0 Advanced Single threading 8 MHz 22 kB 0.5 kB (= program memory) 22 kB (= program memory) 240byte 29 8 bit 5.0V 2
C-Control I Micro Single threading 3.2 MHz 2 kB 0.5 kB (= program memory) - 24 bytes 6 (5) 8 bit 5.0V -
Open maxi Single threading 20 MHz (1.25 MHz) 57.4 kB 57.4 kB (= program memory) 32 kB (I²C-EEPROM) 1800 bytes (512 bytes) 52 10 bits 2.7-5.0V 2 (8)
C-Control II Multithreading (max. 255 threads) 20 MHz 128 kB + 128 kB const. 192 kB 128kB (192kB) 64 kB 34 10 bits 4.096 V 3
C-Control Pro Mega 32 Multithreading (max. 16 threads) 14.7456 MHz 15 kB - 1 kB 2kB 30th 10 bit 2.5V - 5.0V 2
C-Control Pro Mega 128 Multithreading (max. 16 threads) 14.7456 MHz 110 kB - 2 kB 2.6kB 51 (32) 10 bit 2.5V - 5.0V 3

* Notes on the I / Os:
All I / O ports including AD ports and special functions have been taken into account that can be operated from the user program. This also includes host and start buttons, (usable) status LEDs and I²C bus. Ports for RxD and TxD of the (first) RS-232 were not counted, as were the ports for the CAN bus of the C-Control II. For the C-Control Pro 128, the value of the usable I / Os when using an external RAM -Extension written in brackets.

literature

The C-Control is characterized by a wide range of German-language literature. The numerous books and websites cover topics for both beginners and advanced users.

Reading list

Sorted by date of publication:

C-Control I version 1.1

  • Burkhard Kainka: Measure, control, regulate with the C-Control / Basic-System . 2nd Edition. Franzis Verlag, Poing 1998, ISBN 3-7723-6734-8
  • Burkhard Kainka, Martin Förster: C-Control Applications , Franzis Verlag: Poing 1998, ISBN 3-7723-5514-5
  • B. Kluth / C. Kluth: Successfully automate with the C-Control Basic System , Franzis Verlag: Poing 1999, ISBN 3-7723-4984-6
  • Burkhard Kainka: Measuring, controlling, regulating with the C-Control / Basic-System , Franzis Verlag: Poing 2000, ISBN 3-7723-6735-6
  • Burkhard Kainka: C-Control Hardware Extensions , Franzis Verlag: Poing 2000, ISBN 3-7723-5705-9
  • B. Kluth / C. Kluth: C-Control-Station , Franzis Verlag: Poing 2000, ISBN 3-7723-8165-0

C-Control I version 2.0

  • Stefan Tappertzhofen: Measuring, controlling and regulating with C-Control M-Unit 2, 2nd updated edition , Franzis Verlag: Poing 2007, ISBN 978-3-7723-5488-5

C-Control II

  • Burkhard Kainka, André Helbig: Measuring, controlling, regulating with C-Controll II . Franzis Verlag, Poing 2003, ISBN 3-7723-4054-7

C-Control Pro

  • Reiner Schirm, Peter Sprenger: Measuring, controlling and regulating with C-Control Pro . Franzis Verlag, Poing 2007, ISBN 3-7723-4097-0
  • Ulli Sommer: C-Control-Pro - program it yourself and use it in practice . Franzis Verlag, Poing 2007, ISBN 978-3-7723-5089-4

Web links

General

C-Control I

C-Control II

C-Control Pro

Individual evidence

  1. C-Control I BASIC Unit M 1.2 . Manufacturer site. Retrieved July 21, 2011.
  2. Difference between the new UNIT M1.2 and the old M1.1 . Manufacturer site. Retrieved July 21, 2011.