Measurement-computing Digital232 Instrukcja Użytkownika Strona 34

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 59
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 33
Section 3 Command Descriptions
3.12
OUTPUT SELECT Gn
The
Output
Select
command determines the I/O port from which data will be
transmitted when the
Digital232
outputs data to its serial port.
The amount of data
sent is dependent on the
Pn
command.
In any port mode other than
P0,
only the 8 bits
selected by the
Port
command will be output from the
Digital232
serial port.
The default mode,
G0
causes all 40 bits to be sent when data is requested. The
G1
mode causes only data from the ports programmed as inputs to be sent when data is
requested. The
G2
mode causes only data from ports programmed as outputs to be
returned when data is requested.
If all ports are programmed as outputs with
G1
selected and data is requested,
nothing will be transmitted. Conversely, nothing will be transmitted with all ports
programmed as inputs and
G2
selected.
G0
Input and output
port data is output
G1
Only input port data is output
G2
Only output port data is output
Example:
@
reset the
Digital232
P0C1
configure port 1 as input, ports 2-5 as output
G1
select only input ports when data is requested
R0
read data from the
Digital232
input ports
display shows 000000FF (data is dependent
on what is connected to the input)
G2
select output ports when data is requested
R0
read data from the
Digital232
input ports
display shows 00 (outputs default to 0)
Przeglądanie stron 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 58 59

Komentarze do niniejszej Instrukcji

Brak uwag