DISCO-B4 H
ARDWARE
M
ANUAL
V
ERSION
1.0.3
6.1.2 Special pin description (Pins 4, 5, 6)
These
pins have dual functions.
All of them are controlled by the internal firmware of
DISCO-B4. Therefore, the user
must specify whether they will be as analog or digital pins.
This function is controlled by the command
PFAL,IO
0[1,2]
.Config.
If, for example, you
want to use
I/O1
as an analog pin, and the
I/O2
and
I/O3
as digital, the command
settings would look like this:
PFAL,IO
0
.Config=AI,2,11
//
0
= I/O1
;
AI
= analog;
2
and
11
= min. and max.
voltages for Low and High events.
PFAL,IO
1
.Config=DI,5,10
//1 = I/O2; DI = digital; 5 and 10 = min. and max.
voltages for Low and High events
If a pin from
I/O1
to
I/O3
is configured as a digital pin, then the pin must be assigned as
an input or an output. If you want
I/O2
to be an input and
I/O3
to be an output, the
command settings would look like the following:
PFAL,IO
1
.Config=DI,5,10
//
1
= I/O2;
DI
= digital;
5
and
10
= min.
and max. voltages for Low and High
events.
PFAL,IO
6
.Set=high
[low,hpulse,lpulse,cyclic]
//
6
= I/O3;
high
= sets output to high.
Some examples how to use them are given in sections below.
When using an
I/O
as digital you must set it to high first (with PFAL command
“
$PFAL,IO4
[5,6]
.Set=high”
), otherwise 0V will be measured
(and the device could be
damaged).
6.1.2.1
How to use them as analog inputs
Because these pins can operate either as digital or analog, they have to be configured
and calibrated with PFAL commands before using them.
Analog voltages of up to 32.0V with a 10 bits resolution can be processed and remotely
evaluated by a server application. A pull-up resistor to a constant input voltage allows
for resistive transducers to ground, e.g. fuel sensor or thermistors.
To use these IOs as analog, the following command should be set to the device.
PFAL,IO
0[1,2]
.Config=AI,2,11
where 0, 1 and 2 are indices corresponding to IO1 (pin 4), IO2 (pin 5) and IO3 (pin 6)
respectively. While the value 2 and 11 are min. and max. voltages that will be used to
generate Low and High events, respectively.
Detailed information can be found in software manual “
steppIII_FOX-
LT_bolero_lt_PFAL_Configuration_Command_Set.pdf
“
.
↓
Connection example 1 (for I/O1 and I/O2):
An analog input can be connected to a temperature sensor (a NTC resistor for
instance). In the diagram below is used a fixed resistor is used from the input
voltage to the I/O 2, and a variable resistor (
Negative Temperature Coefficient -
whose resistance or capacitance decreases when temperature increases
) to ground.
It is possible to set a low temperature alarm and a high temperature alarm.
Passage through these thresholds will trigger an alarm. We recommend to use
SMS or TCP as alarm type with GPIOP protocol. The SMS can be received on a
mobile phone, modem or any GSM device when changes are detected. The
analog-to-digital converter (ADC) inside the unit has an input voltage range
from 0 to 2.5 V. An application example is shown in figure below:
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 21 of 35