3 use of instruction 96 – Campbell Scientific CR23X Micrologger User Manual
Page 87

SECTION 6. 9-PIN SERIAL INPUT/OUTPUT
6-9
IF GARBAGE APPEARS
If garbage characters appear on the display,
check that the baud rate is supported by the
CR23X. If the baud rate is correct, verify that
the computer/terminal is set for 8 data bits, and
no parity. Garbage will appear if 7 data bits and
no parity are used. If the computer/terminal is
set to 8 data bits and even or odd parity,
communication cannot be established.
6.3 USE OF INSTRUCTION 96
Instruction 96 is used for on-line data transfer to
peripherals (Section 4.1). Each peripheral
connected to the CR23X requires an Instruction
96 with the appropriate parameter. If the CR23X
is already communicating on the 9-pin connector
when Instruction 96 is executed, the instruction
puts the output request in a "queue" and program
execution continues. As the 9-pin connector
becomes available, each device in the queue will
get its turn until the queue is empty.
Instruction 96 is aborted if a modem raises the Ring
line. Data transfer to an addressed peripheral is
aborted if the ring line is raised by an RF Modem
configured as a synchronous device. Transfer of
data is not resumed until the next time Instruction
96 is executed and the datalogger has exited
telecommunications.
The
8
Mode is used to manually initiate
data transfer from Final Storage to a peripheral.
An abort flag is set if any key on the CR23X or
terminal is pressed during the transfer. Data
transfer is stopped and the memory location
displayed when the flag is set. During
8
data transfer the abort flag is checked as
follows:
1.
Comma separated ASCII - after every 32
characters.
2.
Printable ASCII - after every line.
3.
Binary - after every 256 Final Storage locations.
TABLE 6.3-1. CS I/O Pin Description
ABR =
Abbreviation for the function name.
PIN
=
Pin number.
O
=
Signal Out of the CR23X to a
peripheral.
I
=
Signal Into the CR23X from a
peripheral.
PIN
ABR
I/O
Description
1
5 V
O
5V: Sources 5 VDC, used
to power peripherals.
2
SG
Signal Ground: Provides
a power return for pin 1
(5V), and is used as a
reference for voltage
levels.
3
RING
I
Ring: Raised by a
peripheral to put the
CR23X in the
telecommunications
mode.
4
RXD
I
Receive Data: Serial
data transmitted by a
peripheral are received
on pin 4.
5
ME
O
Modem Enable: Raised
when the CR23X
determines that a
modem raised the ring
line.
PIN
ABR
I/O
Description
6
SDE
O
Synchronous Device
Enable: Used to
address Synchronous
Devices (SDs), and can
be used as an enable
line for printers.
7
CLK/HS I/O
Clock/Handshake: Used
with the SDE and TXD
lines to address and
transfer data to SDs.
When not used as a clock,
pin 7 can be used as a
handshake line (during
printer output, high
enables, low disables).
8
12 V
O
12 V: Sources 12 VDC,
used to power 12 VDC
peripherals.
9
TXD
O
Transmit Data: Serial
data are transmitted
from the CR23X to
peripherals on pin 9;
logic low marking (0V)
logic high spacing (5V)
standard asynchronous
ASCII, 8 data bits, no
parity, 1 start bit, 1 stop
bit, 300, 1200, 9600,
76,800 baud (user
selectable).