C Control I Micro-PCB 5 V/DC, 12 Vdc Inputs / outputs 1 x digital I/O / 1 x digital input / 4 x digital I/O or analogue 198289 Hoja De Datos

Los códigos de productos
198289
Descargar
Página de 41
30
define key port[1]
. . .
WAIT key
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. Der
berechnete Wert des Parameterterms geht als Multiplikationsfaktor mit der Grund-
einheit von 20 Millisekunden in die Festlegung
der Pausenzeit ein.
PAUSE term
Beispielsweise wird durch den Befehl
PAUSE 50
die Programmausführung für ca. 50*20 Millisekunden = 1 Sekunde unterbrochen.
Die maximale Zeitabweichung der tatsächlichen Pause vom angegebenen Wert
beträgt dabei prinzipbedingt + 20 Millisekunden.
Kommunikation über die serielle Schnittstelle
Port1 (TXD) und Port2 (RXD) können als serielle Schnittstelle benutzt werden, wenn
sie vorher mit der BAUD-Anweisung initialisiert wurden.
Auch RXD und TXD können innerhalb des Programms andere Funktionen anneh-
men, wenn die Umgebungshardware dies unterstützt.
Define ADPORT1
AD[1] 
Define TRANSMIT
PORT[1]
• 
• 
• 
deact TRANSMIT
a=ADPORT1
Deaktiviert die Funktion TXD des Ports und aktiviert ihn als Analog-Eingang.
Der Analogwert wir in Variable a geschrieben
• Datenausgabe
Die Datenausgabe erfolgt als Text über die serielle Schnittstelle des C-
Control/BASIC Steuercomputers. Ist über ein Schnittstellenkabel zum Beispiel ein
PC mit einem Terminalprogramm angeschlossen, können die ausgegebenen Daten
dort angezeigt werden.
51
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:
RED -
VDD +5V
BLACK -
GND
GREEN - P6/AD6/BEEP
VIOLET 7 - P1/AD1/BEEP/TXD
BROWN - P5/AD5/BEEP
BLUE -
P2/AD2/BEEP/RXD
GREY -
P4/BEEP/FREQ
WHITE -
P3 INPUT
Commissioning
Software Installation
Insert the enclosed CD into the drive on your PC. The selection menu that offers you
different installations appears automatically after a few seconds.
1) First select  > C-CONTROL I
You are now in the selection for the installation of the C-Control I devices.
2) Here select C-CONTROL/BASIC – MICRO
3) The window that appears offers the option "OPEN"
Select this option to start the installation.
4) After the installation is complete, the development environment opens.
Loading and Starting the First Program
Getting the P/E Board ready for operation
Get the P/E Board and the C-Control MICRO ready for operation as described in the
chapter "Handling".
Make sure that the jumpers are set (JP1 on Pos. 1-2) and that the sliver is on OFF.
Make sure that the development environment uses the right interface (selection
takes place via the menu OPTIONS > ENVIRONMENT > LOADER.
Loading a program into the development environment
Select "FILE OPEN" in the menu bar. Open the file "1_EINFÜHRUNG_PORTS1.BAS"
in the folder "PROGRAMME/CC1MICRO/BASIC".
This is a little example that demonstrates access to the ports of the C-Control
MICRO.
In the editor of the development environment, you see the source text of the program
with additional explanations about its function.