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 데이터 시트

제품 코드
198289
다운로드
페이지 41
64
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.
RANKING OPERATORS
9
(  )
8
Function references
6
* / MOD  SHL SHR
5
+    -
4
>  >=  <  >=   =  <>
3
NOT
2
AND   NAND
1
OR   NOR   XOR
Instructions for control of the program flow
• Loop
FOR variable = start TO end STEP increment
. . .
NEXT
The FOR loop executes the instructions up to NEXT as long as the value variable is
equal to the value of the terms end. Before the first run, the value of the term start is
calculated and assigned to the loop variable. In each run, the value of the incremen-
tal term is added to the loop variable. In the form
FOR variable = start TO end STEP increment
. . .
NEXT
The increment has the constant 1. The values of the end terms and the incremental
term are recalculated for each loop run. That allows extended control of the course
of the program. 
A loop is always run through at least once even if start and end have the same val-
ues.
17
A/D-Wandler
Die C-Control MICRO hat keine eigene Referenzspannung. Als Referenz für die AD-
Wandler dient die Betriebsspannung (5V). Spannungsregler stellen diese mit recht
guter Genauigkeit zur Verfügung (+-5%)
Wenn Sie erhöhte Anforderungen an die Genauigkeit der AD-Wandler haben, müs-
sen Sie die  5V Betriebsspannung mit entsprechender Genauigkeit zur Verfügung
stellen. 
Der angelegte Spannungswert gilt als Obergrenze des Messbereiches der A/D-
Wandlung und entspricht dem Wandlungswert 255 (SFF hexadezimal). 
Als Referenz für das untere Ende des Messbereiches der A/D-Wandlung dient stets
das Groundpotential (Masse, ,,Minus”) der Betriebsspannung. An den  A/D-Ports
können Sensoren aller Art angeschlossen werden, die eine Ausgangsspannung von
0 bis 5 Volt liefern. In den meisten Fällen werden hier aktive Sensoren zur Anwen-
dung kommen, um das Signal des eigentlichen Sensorelementes zu verstärken und
den Ansprüchen an Auflösung, Linearität und Driftverhalten zu genügen.
Frequenz Eingang 
Bei der C-Control MICRO kann nur Port4 als Frequenzeingang FREQ dienen. 
FREQ2 wird von der IDE zwar akzeptiert (um die Kompatibilität zu C-Control I zu
wahren) hat jedoch in der MICRO eine andere Funktion
Frequenzmessung an Pin FREQ
Über den Pin FREQ2 können Frequenzen von CMOS/TTL-kompatiblen Rechtecksig-
nalen bis ca. 12000 Hz gemessen werden.
Frequenz  Ausgang - BEEP
Bei der C-Control MICRO können alle Ports (mit Ausnahme Port 3) die Funktion
eines Beep-Ports annehmen.
Die verfügbaren Ports sind PORT1, PORT2, PORT4, PORT5, PORT6.
Andere Ports werden von der Entwicklungsumgebung zwar akzeptiert (um die Kom-
patibilität zu C-Control I zu wahren), jedoch führt deren Verwendung zu absolut
unkontrollierbaren Verhalten der MICRO
Tonausgabe an den BEEP-Pins
Am BEEP-Pin können per BEEP-Befehl (siehe unten) Rechtecksignale (0/5V) ausge-
geben werden, die  durch Anschluß eines piezoelektrischen Schallwandlers (Schall-
wandler ohne interne Elektronik zwischen BEEP und GND) als Töne hörbar gemacht
werden können.