beautypg.com

Remote Processing RPC-210 User Manual

Page 44

background image

ANALOG I/O

BASIC

SECTION 10

Page 10-2

W h e n I / O ra n ge is 5V m a x. , s e t W 1 2[ 1- 2] . I f t he I/ O
range is 2.5V max. , set W12[2-3].

When W 12 is set to [1-2], a higher, but noisier su pply
v o lt ag e is ap p li ed to th e bu ff e rs . T he r es ul t i s D / A
o u tp u ts ar e sl ig h tl y n o is ie r (8 b it s o r so ) a n d A / D
readings are noisier.

WARNING:

Buffers obtain power from the RS-232 driver when
W12 is set to [1-2] (5V range). If one or both serial
ports ar e under heavy load, the supply voltag e will
probably drop, causing the 5V reference to go out of
reference. This will result in inaccurate A/D and
D/A r eadings in the 5V range.

The 5V max. range is provided for uses that do not need
high conversion accuracy and where wiring is simplified
by directly connecting to the inputs. Highest accuracy
and best per form ance is wh en A/ D and D /A is se t to
2.5V m ax. range.

ACQUIRING ANALOG DATA

A n a lo g da t a i s a c qu ir e d us in g th e A IN (n) function. n is
the channel number in the range of 0 to 8. The function
returns a number from 0 to 4095. Channel 8 returns the
t e mp e r at ur e fr o m th e r ef e r en c e i n t he C P U .

The AIN comm and makes 8 conversions then averages
them. T his tends to reduce noise, possibly eliminating
the need for filter cap acitors on the inputs.

The input range for all channels is set by jumper W11.
When ins talled, the input ran ge is 0 to 5V vo lts. T his is
adjustable to ±0.05 volts. W hen W11 is removed, the
range is 0 to 2.5 ± 0.05V . T his voltage is not ad justable
a s it is se t b y th e C P U .

AIN2 10-1. BAS conve rts all chann els and conten tiously
prints the r esult.

Acquiring after low power or sleep modes
You need to allow at least 1/4 second after exiting from
low pow er or sleep mod es to stabilize pow er. This
includes modes where the RS-232 port is powered off.
Y o u c a n i nc lu d e p o we r up r es et ti m e, n o r ma ll y a b ou t 1 / 4
second, in your wait time ca lculations.

INPUT SIGNAL CONSIDERATIONS

Slew Rate
Slew ra te is the rate of signal change . It is usua lly
expressed as volts/second, but other units are also used.

I d ea l ly , s ig n al s p r e se n te d to th e RP C - 2 10 a r e s te a dy , D C
signals. However , this is not a real world situation.
Input signals are always changing.

To get a good reading from the ADC, the input signal
should be relatively stable during the sampling time.

Since RPBASIC-52 takes 8 readings for aver aging, the
signal should be stable for at least 200 micr o-Seconds.

Signal Source
The output resistance (impedance) of the signal source
should be as low as possible. A low impedance source
helps keep noise low and reduces errors due to source
resistance.

Voltage er rors are pr imar ily due to the 1 M ohm pull
down resistors at the analog inputs. For ½ L SB
accuracy, source impe dance should be 500 ohm s or less.

Inputs are buffered through a high impedance op-amp.
Input impedance is on the order of several hundred
meg-oh ms. Resistor n etwor k R11 can be rem oved to
allow an increase in source resistance . If you do this,
then all unused inputs must be grounded.

TEMPERATURE MEASUREMENT

The A DU C812 A -D re serves c hannel 8 for an on-chip
temperature sensor. This sensor is used to get an
a m b ie n t t em p e r at ur e r ea d in g ar o u nd th e C P U .

T h e se n so r ty p ic a ll y o u tp u ts a 60 0 m V s ig n al @ 25 °C .
This voltage is not specified, however, and could vary
from one unit to another. V oltage typically changes by -
3.0 mV/ °C. T he sensor is on the CP U chip, so it is
good for measuring ambient temperature in that area.

AIN-1.BAS prints the temperature as a voltage.

CONVERSION ERRORS

The A /D and D/ A conve rters h ave 12 bit resolution.
Note that resolution is not necessarily the same as
accuracy. The converters have sources of errors that
greatly affect accuracy.