DAEnetIP3
User Manual
-
36
-
Figure 34.
ADC FIFO buffer
1. Firstly, it is performed right sift.
2. Secondly, the oldest value (N1, which came first) now is removed
3. Thirdly, the new measured ADC value is stored as N8 (the newest value)
This cyclic action is performed with period “
Refresh Time”
.
The formula for calculating the analog input voltage is given below:
V
n
Ain
n
Vin
,
1024
048
.
2
*
]
[
]
[
where Vin is the voltage of the ADC channel and n is the number of the channel
(from 0 up to 7). The reference voltage is 2.048V.
For example if we get ADC value = 512 from channel 0 (PortC.0), the voltage
would be 512*2.048/1024=1.024 Volts
The ADC value can be read also directly by special command in measurement
units (for example in C, F, V, m...), depending on the used sensor. This is also so
called
analog inputs
linearization
. This is usually used when there is connected
sensor to the analog input. This is also so called software calibration and it can be
done for each analog input separately. The formula is:
Label
n
Ain
n
Min
n
Max
n
Min
n
value
ADC
],
[
*
1024
])
[
]
[
(
]
[
]
[
_
where ADC_value[n] is the value in measured units (temperature, voltage,
hummidity...), Min[n] is the is the minimum value, Max[n] is the maximum value and
Ain[n] is the ADC channel value and n is the number of the channel (from 0 up to 7).
For example if we connect LM35DZ temperature sensor to the PortC.0, to get the
value directly in
ºC. LM35DZ can measure from 0 to 100 ºC and gives 10mv/ºC and
at 0ºC it gives 0V, so:
Min[0] = 0
Max[0] = 250 this is the value in ºC which would appear if the voltage is 2.048V
(the value at 1024).
Label = C (there is limitation for the symbols)
So if we get reading 256, that's mean that the value returned by this special
command will be 62.5 ºC
9.3.
Refresh time
This is the period for reading (refreshing) the analog inputs. The minimum value is
1 (0.1s=100ms). The maximum is 99 (9.9ms=9900ms). The default value is 1.
9.4.
Low Threshold (LT)
This is one of the thresholds (limits) that is used for events generating. The value
is between 1 and 1023.