Measurement-computing Digital488/80A Instrukcja Użytkownika Strona 55

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 54
C - Configuration
SYNTAX
Cn Define I/O mode n of ports, where n = value from 0 to 5.
C0
(Default) Define all 5 ports as input.
C1
Define Port 1 as output; the other ports are input.
C2
Define Ports 1 and 2 as output; the other ports are input.
C3
Define Ports 1 through 3 as output; the other ports are input.
C4
Define Ports 1 through 4 as output; Port 5 is input.
C5
Define all 5 ports as output.
C? Returns current port configuration mode n.
DESCRIPTION
Ports 1 through 5 are configured as inputs or outputs with the Configuration (
C) command. Each port is 8-bits wide. At
power-up, all ports are initialized as inputs; the Configuration command is usually the first command to be sent after
power-up. All ports programmed as outputs are set to a logic 0 after receiving the Configuration command. The actual
output level is dependent upon the Invert command (
I16).
Configuration Command Port 5 Port 4 Port 3 Port 2 Port 1
C0
Input Input Input Input Input
C1
Input Input Input Input Output
C2
Input Input Input Output Output
C3
Input Input Output Output Output
C4
Input Output Output Output Output
C5
Output Output Output Output Output
CAUTION
Because the Configuration (C) command is used, the following programming
example(s) will not work properly if the HVCX1 option is installed with a conflicting
hardware configuration. To be safe, remove the HVCX1 board and replace it with the
jumper board to run the example(s).
EXAMPLE
PRINT#1,"CLEAR08"
Line 1: Reset the Digital488/80A.
PRINT#1,"OUTPUT08;C1X"
Line 2: Configure Port 1 as output; Ports 2 through 5 as inputs.
PRINT#1,"OUTPUT08;C?"
Line 3: Query current port configuration.
PRINT#1,"ENTER08",
INPUT#2,A$,
PRINT A$
Line 6: Display shows: C1
Digital488/80A User’s Manual
967695 Digital488/80A Commands 49
Przeglądanie stron 54
1 2 ... 50 51 52 53 54 55 56 57 58 59 60 ... 105 106

Komentarze do niniejszej Instrukcji

Brak uwag