CONRAD IM INTERNET http://www.conrad.de BEDIENUNGSANLEITUNG OPERATING INSTRUCTIONS Version 01/04 C-CONTROL 1 MICRO / MICRO-PCB Programmer/Evaluation Board Seite 3 - 41 100 % RecyclingPapier. Chlorfrei gebleicht. Impressum Diese Bedienungsanleitung ist eine Publikation der Conrad Electronic GmbH. Alle Rechte einschließlich Übersetzung vorbehalten. Reproduktionen jeder Art, z. B.
Wichtig! Unbedingt lesen! Technical Data C-CONTROL MICRO/MICRO-PCB Operating voltage 5V +- 10% ( 8 - 12V at sep. supply MICRO-PCB) Current input (ports input) 6mA max. LO inlet level ports 0.3 x Vdd min. HI inlet level ports 0.7 x Vdd min HI outlet level ports P3,P5 / P1,P2,P4,P6 Vdd - 1.5 / Vdd - 0.8 (at –10 mA) max. LO outlet level ports P3,P5 / P1,P2,P4,P6 1.5V / 0.8V (at 10 mA) max. leakage current port Input 1uA Basic work speed 30000 instructions per second Internal bus cycle 3.
The programs can be loaded but nothing happens on "start” - You did not configure the P/E board correctly (jumper) - You have an application in which PORT3 does not lie on log high when it is switched on - Your application needs too much power and overloads the voltage controller or battery Einleitung Wir danken Ihnen für Ihre Entscheidung zum Erwerb des Programmer/Evaluation Boards für die C-Control MICRO/MICRO-PCB.
PEAK TIME: Writing the system variable FREQ sets the peak time (20 ms steps). PORT4 has to be an input for this function. The peak time is the time during which impulses are counted at the input. The peak time is stated in units of 20ms. Do not use small peak times for high frequencies. At a peak time of 20ms, a counter status results, for example of 10Khz, in FREQ of: 0.02*10000 = 200. At greater peak times, lower frequencies can also be measured quite precisely.
MINUTE (0...59) SECOND (0...59) Please observe the fact that the internal clock continues to run during access. The second value should therefore always be read first. If it shows 59 it is necessary that after reading the last interesting time information (e.g. HOUR) the second value is read again and test for =O. In this case, the real-time clock has to be read again as a new minute has been started.
To switch the port over (ON to OFF; OFF to ON), you can write P = NOT P ACHTUNG: Verwenden Sie Port 3 niemals in Anwendungen bei welchen nicht sichergestellt ist, dass Port 3 beim Anlegen der Betriebsspannung log. high ist, da sonst der Download-Modus aktiv ist und das Anwenderprogramm nicht läuft. or the command Anzeigeelemente TOG P used. TOG stands in English for "toggle”. The TOG command requires less space in the EEPROM and is executed more quickly than the classical NOT-P construction.
Define ADPORT1 Define TRANSMIT • • • deact TRANSMIT a=ADPORT1 AD[1] PORT[1] deactivates the function TXD of the ports and activates it as an analogue input. The analogues value is written in variable a. • Data output Data output takes place as text through the serial interface of the C-control/BASIC control computer. If a PC with a terminal program is connected by means of an interface cable, for example, the data output can be displayed there. PRINT term outputs the result of the calculation of term.
construction must be contained in a source text line. Instruction blocks (several instructions) after THEN are not permitted. • Branch instruction GOTO label With the GOTO instruction, the control computer can be prompted to continue program processing at a certain point. A label identifier is stated as the branch target. The branch target can be positioned before or after the GOTO instruction in the source text.
tion”). For equally-ranked operators, calculation takes place from left to right. As in mathematics, however, influence can be taken on the calculation order by placing a bracket. CCBASIC supports a maximum of 3 bracket levels. For the sake of the clearness of a program, "wild” brackets should be avoided, however, and complex calculations distributed to several BASIC lines. The following list shows the CCBASIC operator ranking order.
Definition of analogue ports Ports as also variables are accessed in CCBASIC . Here also, each port used has to be previously defined. • Definition of one of the 4 A/D ports: DEFINE identifier AD[nrl whereby values of 1,2,5 or 6 are permitted for nr. CAUTION: Although other ports are accepted by the development environment (to preserve the compatibility with C-control I ), their use leads to absolutely uncontrollable behaviour of the MICRO.
Definition of symbolic constants It is good programmer style to use symbolic constants in the program IF x > 123 THEN GOTO alarm rather than "magic” figures. The readability of the source text is increased by issuing significant identifiers for constants. A program is also easier to maintain when all the constants are defined globally. This applies in particular when one and the same constant is required several times in the program.
Apart from this, symbolic constants can be agreed by virtue of DEFINE lines (see below). Variables are accessed through their identifier. Before the variables are used for the first time in the program, this identifier has to be defined in a DEFINE line. Labels Labels mark certain points in the order of the program operations. Labels are goals of branch operations within an algorithm.
Programming the C-Control Computer CCBASIC is the BASIC dialect used for programming the C-control BASIC control computer. The syntax corresponds approximately to that of standard BASIC. In some commands there are deviations or extensions which are tailored specially to the hardware of the control computer. The CCBASIC of the MICRO is for the most part compatible with other versions of the C-control I computer but fundamentally limited to 8-bit operations/instructions.
Using a Digital Port as Input Digital inputs are used to query switching states. If a digital port is used as input, it maintains an undefined level in an unswitched state that has to be defined with a PULLUP resistance, for example. For example, if a reed contact is connected to this port, a logical 1 ("true") is read off the port with open switch and a logical 0 ("false") with closed switch.
Download into C-CONTROL MICRO In order to download a user program from the development environment, keep the button "DOWNLOAD" depressed and slide the slider switch to the position "ON" (towards the interface plug). The readiness for download is indicated with the yellow LED (L5). Now you can load the program into C-CONTROL. Activate the download in the menu DEVELOPMENT > LOAD TO C-CONTROL. A window shows the start and the end of the download.
JUMPER JP2 If you want to do without the available output possibilities altogether because you have connected your application to the post plug, pull off both jumpers JP2 and JP1. PRINT term gibt das Ergebnis der Berechnung von term aus. PRINT "text" C-Control Computer MICRO / MICRO PCB The P/E Board provides the operating voltages for the operation of the C-Control computer on the board. If you operate the computer in a different hardware environment, you must provide a stable operating voltage.
Programmer/Evaluation Board The P/E Board provides the user with a serial interface with level conversion in order to load compiled programs from the development environment into the C-Control computers version MICRO and MICRO. In addition, there are a number or input/output possibilities (LEDs, beepers, buttons, potis) so that you can quickly and comfortably try out the example programs or your own applications. Power supply takes place with a 9 V battery or a power pack (8 to 12 V).
Product Description Intended Use The C-Control BASIC control computer serves for the programmable access of electric and electronic devices operated with low-voltage safety current. These devices may be integrated into any technical systems that do not directly or indirectly serve for medical, health or life-sustaining purposes or whose operation may pose risks to persons or assets. You may only use the provided PC software and the P/E Board for programming the computer.
Introduction Thank you for purchasing the Programmer/Evaluation Boards for C-Control MICRO/MICRO-PCB. It lets you program both types of the C-Control Micro in the development environment and load the programs to C-Control MICRO / MICRO PCB. The Programmer/Evaluation Board ( P/E-Board) for C-Control MICRO/MICRO-PCB also offers you a series of input/output possibilities (LEDs, beepers, buttons, poti) so that you can quickly and comfortably try out the example programs or your own applications.
Important! Read this! Prior to commissioning the Programmer/Evaluation Board for C-Control MICRO/MICRO-PCB or connected devices, read these operating instructions completely! It explains the correct handling and points out possible hazards. Conrad Electronics will not assume any liability for damages resulting from the noncompliance with this manual. These damages are also not covered by the warranty.
Diese Bedienungsanleitung gehört zu diesem Produkt. Sie enthält wichtige Hinweise zur Inbetriebnahme und Handhabung. Achten Sie hierauf, auch wenn Sie dieses Produkt an Dritte weitergeben. Heben Sie deshalb diese Bedienungsanleitung zum Nachlesen auf! Eine Auflistung der Inhalte finden Sie in dem Inhaltsverzeichnis mit Angabe der entsprechenden Seitenzahlen auf Seite 3. These Operating Instructions are part of the product. They contain important information on commissioning and installation.
Programmierung des C-Control Computers .........................................................18 Die Beispiele zum Erlernen von CC-BASIC ....................................................18 Was ist ein Programm? ......................................................................................18 Grundlegende Elemente von CCBASIC .............................................................19 Allgemeines..................................................................................................
kreise und Steckbrücken. Es besteht keine Haftung für Schäden, die unmittelbar durch oder in Folge der Anwendung des Programmer/Evaluation Board’s stehen. Unberührt davon bleiben Ansprüche, die auf unabdingbaren gesetzlichen Vorschriften zur Produkthaftung beruhen. Jede C-Control MICRO sowie das P/E Board verlassen das Werk in einwandfreiem und funktionsgeprüften Zustand! Conrad Electronic bietet für diese Produkte eine Gewährleistungs-dauer von 24 Monaten.
Nachdem die Geräte von einem kalten in einen wärmeren Raum gebracht wurde, dürfen sie nicht sofort in Betrieb genommen werden. Das möglicherweise entstandene Kondenswasser kann zu Funktionsstörungen oder zum Ausfall elektronischer Bauelemente am Gerät führen. Vermeiden Sie starke Magnetfelder, wie sie in der Nähe von Maschinen oder Lautsprechern vorkommen. Alle elektrischen Verbindungen von und zum Gerät sind stets vor Anschluß der Versorgungsspannung herzustellen.
Handhabung Programmer/Evaluation Board Anschluss der C-Control Computer Stecken Sie einen C-Control Computer der Ausführung MICRO in den dafür vorgesehen IC-Sockel. Achten Sie dabei unbedingt auf richtige Polarität. Die Kerbe am Gehäuse des IC ist neben dem Kondensator C3. Wollen Sie die Ausführung MICRO PCB programmieren, so schließen sie die Anschlussdrähte entsprechend der Farbkennzeichnung an der Klemmleiste an. ACHTUNG: Es dürfen niemals 2 C-Conrol MICRO gleichzeitig gesteckt und angeschlossen sein.
C-Control Computer MICRO / MICRO PCB PRINT Das P/E Board stellt die Betriebsspannungen für den Betrieb des C-Control Computers auf dem Board zur Verfügung. Betreiben sie die Computer in einer anderen Hardwareumgebung, so müssen Sie eine stabile Betriebsspannung zur Verfügung stellen. • Byte-wise communication through the serial interface While PRINT transmits or expects short character strings for the presentation of numeric value, it can be desirable to transmit individual bytes serially.
Es ist ein kleines Beispiel, das den Zugriff auf die Ports der C-Control MICRO demonstriert. Im Editor der Entwicklungsumgebung sehen Sie den Quelltext des Programms mit zusätzlichen Erläuterungen zur Funktion. RETURN Download in die C-CONTROL MICRO Zum Download eines Anwenderprogramms aus der Entwicklungsumgebung halten Sie den Taster "DOWNLOAD" gedrückt und schieben den Schiebeschalter in die Position ON (in Richtung des Schnittstellensteckers).
Digitalports Bei der C-Control MICRO können alle Ports die Funktion eines Digitalports annehmen. Die verfügbaren Ports sind PORT1, PORT2, PORT3, PORT4, PORT5, PORT6. Andere Ports werden von der Entwicklungsumgebung zwar akzeptiert (um die Kompatibilität zu C-Control I zu wahren), jedoch führt deren Verwendung zu absolut unkontrollierbaren Verhalten der MICRO Benutzung eines Digitalports als Eingang Digitaleingänge werden zur Abfrage von Schaltzuständen verwendet.
Programmierung des C-Control Computers operation). The logical operators can, apart from for the formulation of conditions (usually in connection with relational operations), also be used for binary byte manipulations. CCBASIC ist der BASIC-Dialekt, der zur Programmierung des C-Control BASIC Steuercomputers verwendet wird. Die Syntax entspricht in etwa der des StandardBASIC. Bei einigen Befehlen gibt es Abweichungen oder Erweiterungen, die speziell auf die Hardware des Steuercomputers zugeschnitten sind.
Variablen und Konstanten Variablen und Konstanten sind Objekte des Informationsverarbeitungsprozesses. In CCBASIC speichern beide einen numerischen Wert. Während der Wert einer Konstante einmal angegeben wird und dann unverändert bleibt, kann sich der Wert einer Variablen im Lauf des Programms beliebig oft ändern. Konstanten können in CCBASIC in dezimaler, hexadezimaler und binärer Form angegeben werden.
Probleme sogar Grundvoraussetzung. Anweisungen zur Steuerung des Programmflusses bestehen aus einem oder mehreren reservierten Worten und erfordern in jeweils spezieller Weise eventuell weitere Angaben. GOTO labell IF a > b THEN GOSUBlabel2 FOR i = 0 TO 10 STEP 2 .._ NEXT Compileranweisungen Zusätzlich zu den Programmanweisungen enthält ein CCBASIC-Quelltext Compileranweisungen, die zum Beispiel zum Anlegen von Datenblocks (Tabellen) oder zur Definition von Variablen- und Konstanten dienen.
Definition von Digitalports In CCBASIC wird auf Ports wie auf Variablen zugegriffen. Auch hier muß jeder verwendete Port zuvor definiert sein. • Definition eines der 6 Digitalports: DEFINE bezeichner PORT[nr] ACHTUNG: Bei der C-Control MICRO können alle Ports die Funktion eines Digitalports annehmen. Die verfügbaren Ports sind PORT1, PORT2, PORT3, PORT4, PORT5, PORT6.
• Die Zufallsfunktion RAND liefert den nächsten Integer-Zufallswert des Pseudo-Zufallsgenerators. Die Zufallszahlen werden mit einem einfachen Verfahren erzeugt und sind mit einer echten Zufallszahl natürlich nicht zu vergleichen, aber für die meisten Zwecke ist das ausreichend. Der Wertebereich von RAND ist 0 bis 255. Durch geschickte Manipulation können Sie aber beliebige Wertebereiche (z.B. für einen Lottozahlengenerator) einstellen.
FOR vl = anfangl TO ende1 ... GOTO anothernext ... NEXT FOR v2 = anfang 2 TO ende2 ... #anothernext NEXT Achten Sie außerdem auf den Wertebereich von Schleifenvariable und ende-Term! This use leads to uncontrollable malfunctions of the C-Control and difficult to localise errors. DEFINE v BYTE FOR v = 1 TO 1000 ... NEXT Realtime Clock (RTC) wird zu einer Endlosschleife, da v als Bytevariable nie den Wert 1000 erreichen kann, sondern bereits nach 255 wieder auf 0 überrollt.
define key port[1] ... WAIT key A violation of these guidelines, especially with respect to the max. power intake leads to the destruction of sensitive components on the circuit board. The wires of the C-Control MICRO have the following functions: In diesem Beispiel wird solange gewartet, bis vom Digitalport 1 ein HIGH-Pegel (= logisch 1) gelesen wird. Der PAUSE Befehl unterbricht die Programmausführung für eine gewisse Zeit.
GET variable wartet auf ein seriell empfangenes Byte und speichert den Wert dann in der angegebenen Variablen. Beachten Sie bitte, dass GET endlos wartet, wenn kein Byte empfangen wird. Außerdem wird während der Wartezeit die Systemuhr RTC nicht weitergestellt. • Weitere Schnittstellenbefehle und -funktionen BAUD 9600 BAUD 19200 schaltet beispielsweise Sender und Empfänger auf die entsprechende Rate um und ist einmalig zur Initialisierung der seriellen Schnittstelle erforderlich.
LOOKTAB tablename,index,variable tablename bezeichnet eine gültige Tabelle, für index kann ein beliebiger Term stehen und die variable bezeichnet die Speicherzelle, in der das Ergebnis abgespeichert werden soll. Der berechnete Wert des index-Terms darf nicht negativ sein und maximal N-l betragen, wenn die indizierte Tabelle N Einträge hat. Ergibt index den Wert 0, so wird CO in der angegebenen Variablen gespeichert, für index gleich 1 Cl und so weiter.
Interner Timer,Tonerzeugung, Frequenzmessung • Timer Der interne 20-Millisekunden-Timer kann über den vordefinierten Bezeichner TIMER ausgelesen werden. Der Timer ist freilaufend und darf nicht gestellt werden. Er nimmt maximal den Wert 59 an und rollt danach auf 0 x = Timer ist zulässig, Timer = x ist nicht zulässig! Each C-Control MICRO as well as the P/E Board leave our factory in perfect and function-tested condition! For these products, Conrad Electronic grants a warranty of 24 months.
Systemerweiterungen und Treiber Conrad Electronic stellt für die C-Control MICRO CCBASIC Systemerweiterungen und Treiber für Zubehör zur Verfügung. Dafür ist in der MICRO die PAGE 1 und PAGE 0 am hinteren Ende des Basic-Programmspeichers vorgesehen. Jede dieser Seiten belegt 256 Bytes und verringert den Basic-Programmspeicher entsprechend, wenn sie geladen werden.
Technische Daten C-CONTROL MICRO/MICRO-PCB Betriebsspannung 5V +- 10% ( 8 - 12V bei sep. Versorgung MICRO-PCB) Stromaufnahme (Ports input) 6mA max. LO Eingangspegel Ports 0.3 x Vdd min. HI Eingangspegel Ports 0.7 x Vdd min HI Ausgangspegel Ports P3, P5 / P1,P2,P4,P6 Vdd - 1.5 / Vdd - 0.8 (at –10 mA) max. LO Ausgangspegel Ports P3, P5 / P1,P2,P4,P6 1.5V / 0.8V (at 10 mA) max. Leckstrom Port Input 1uA Basic Arbeitsgeschwindigkeit 30000 Instruktionen pro Sekunde Internern Bustakt 3.