l
Many applications do not require the use of
SDMSpeed()
.
l
If intermittent communications with several devices connected at once is experienced, or
when using long cables, use
SDMSpeed()
to increase the bit period above the default. Try
doubling the bit period until a stable link is achieved.
l
To maximize communication speeds because of skipped scans, decrease the bit period.
Changing the clock rate is accomplished by changing the bit period of the clock signal. A short
bit period equates to a faster clock rate and faster data transfer. A long bit period equates to a
slower clock rate and a slower data transfer more suitable for long cable lengths or many
connected devices.
The syntax of this instruction is as follows:
SDMSpeed
(BitPeriod)
The
BitPeriod
argument can be a constant or variable integer. If the
SDMSpeed()
instruction
is not included in the program, the default bit period for the clock line will be used. If the bit
period specified is smaller than the minimum or larger than the maximum, the data logger will
default to the minimum or maximum bit period, respectively. Refer to
CRBasic Editor Help
for the
default, minimum, and maximum bit period for each data logger.
7. Theory of operation
The SDM-CD16ACA is a synchronously addressed peripheral. C2 and C3, driven high by the data
logger, initiate a cycle. While holding C3 high, the data logger drives C2 as a clock line and C1 as a
serial data line. The data logger shifts out a data bit on C1 (LSB first) on the falling edge of the C2
clock. The SDM-CD16ACA shifts in the C1 data bit on the rising edge of the C2 clock.
The first 8 bits clocked out represent the SDM-CD16ACA address. If the address matches the
SDM-CD16ACA address, the SDM-CD16ACA is enabled. If enabled, the next 16 bits are shifted
into the SDM-CD16ACA, each bit controlling one port, the first of which controls port 1.
When the 16 control bits are clocked in, C2 is held high while C3 is pulsed low then high to latch
the control bits. The data logger then lowers both C3 and C2 to complete the cycle.
SDM-CD16ACA 16 Channel AC/DC Controller
10