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
70
To switch the port over (ON to OFF; OFF to ON), you can write
P = NOT P
or the command
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.
The port variable P may only stand in the TOG command for a single digital port.
• Deactivation of a ports with DEACT
As soon as a port variable is assigned a value for the first time, the control computer
switches the associated hardware structures in the processor chip (transistors) to
output operation. That means current flows out of or into the processor (max. 10 mA
permitted!) in accordance with the switching connected. The command
DEACT portvar
deactivates the port given. That means, the port is switched to a high-resistance
condition and works in the input area. The DEACT command may be used on single
digital ports or byte ports.
Definition and applications of data tables
In standard BASIC, DATA lines serve for storing constant data blocks which can then
be accessed sequentially. CCBASIC does not support any DATA lines but offers a far
more flexible tool for the definition and access to data blocks. Constant data can be
stored in the form of tables. Each table is assigned an identifier (table name) and can
contain any desired number of entries as long as the program memory provides
room. Each data entry (Cx) is stored as an integer value and thus occupies two
bytes. The data can be listed directly in the source text thereby but may only accept
values of up to a maximum of 255 as tables can only be processed by the byte
TABLE tablename
CO Cl C2 C3 C4 C5 . . -.. . Cn
TABEND
or be imported from an external text file by the CCBASIC compiler.
TABLE tablename "tabfilename"
11
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.
Anzeigeelemente  
Im Anwenderprogramm können sie die vorhandenen Anzeigeelemente beliebig nut-
zen.  
Die LEDs  sind entsprechend Ihrer jeweiligen Bezeichnung an die zugehörigen Ports
angeschlossen,
d.h. L3 ist an Port 3 angeschlossen.
Wenn die Ports 1 u. 2 in Ihrem Programm nicht aktiviert sind ( INPUT), oder die
MICRO auf einen Download wartet,  leuchten die zugehörigen LEDs leicht, da sie
über den RS 232 Pegelwandler mir Strom versorgt werden. 
Zum Ausprobieren der AD-Wandler ist ein Potentiometer vorhanden, das eine varia-
ble Spannung an den AD6
liefert. Die Spannung wird größer, wenn Sie das Potentiometer gegen den Uhrzeiger-
sinn drehen. Ein Beeper ermöglicht akustische Signale.
Jumper zur Konfiguration
Damit sie nicht an die vorhandenen Anzeigeelemente gebunden sind, können diese
abgetrennt werden.
Sie können dann eine eigene Applikation an den Pfostenstecker anschließen.
JUMPER JP1
JP1 ermöglicht den Betrieb des Beepers zusammen mit der variablen Eingangs-
spannung an Port6/AD6
Eine Beispielprogramm, das in das Verzeichnis "BASIC" installiert wird, zeigt Ihnen
wie Ports während eines Programmablaufs mit unterschiedlichen Eigenschaften
genutzt werden können.
Für den Betrieb des Beepers zusammen mit der variablen Eingangsspannung an
Port6 muss der Jumper auf die Position 1-2 gesteckt sein.
Wollen Sie darauf verzichten und lieber eine zusätzliche LED zur Verfügung haben,
so stecken Sie den Jumper auf Position 2-3
JUMPER JP2
Wollen Sie gänzlich auf die vorhandenen Ausgabemöglichkeiten verzichten, weil Sie
Ihre Applikation am Pfostenstecker  angeschlossen haben, zu ziehen sie beide Jum-
per JP2 und JP1 ab.