User’s Manual
43
4.4.2 Digital I/O
Each of the BL2100 high-current outputs (OUT00–OUT15) has the capability of being configured in
software as either sinking or sourcing using the
digOutConfig
function. Execute
digOutConfig
at the start of your application to initially set OUT00–OUT15 to be OFF for the type of circuit that you
have, either sinking or sourcing.
To properly set the high-current outputs, you will need to decide for each channel whether the output is
sinking or sourcing. The
digOutConfig
function will then ensure that each output remains OFF when
the digital output control interface is
initialized.
The individual high-current outputs remain activated
until you activate the desired output driver(s)/channel(s) using
digOut
.
NOTE:
The
brdInit
function must be executed before calling
digOutConfig
.
NOTE:
You must execute the
digOutConfig
function to set the high-current drivers to be
either sinking or sourcing. A runtime error will occur in
digOut
if
digOutConfig
has not
executed.
NOTE:
The extra digital outputs resulting from the reconfiguration of IN16–IN23 as digital out-
puts are sinking outputs only and cannot be configured with
digOutConfig
.
PARAMETER
outputMode
is a 16-bit parameter where each bit corresponds to one of the following high-current
outputs.
Bit 15 = high-current output channel OUT15
Bit 14 = high-current output channel OUT14
Bit 13 = high-current output channel OUT13
Bit 12 = high-current output channel OUT12
Bit 11 = high-current output channel OUT11
Bit 10 = high-current output channel OUT10
Bit 9 = high-current output channel OUT09
Bit 8 = high-current output channel OUT08
Bit 7 = high-current output channel OUT07
Bit 6 = high-current output channel OUT06
Bit 5 = high-current output channel OUT05
Bit 4 = high-current output channel OUT04
Bit 3 = high-current output channel OUT03
Bit 2 = high-current output channel OUT02
Bit 1 = high-current output channel OUT01
Bit 0 = high-current output channel OUT00
The high-current outputs can be configured to be sinking or sourcing outputs by setting the correspond-
ing bit to an 0 or 1: 0 = sinking, 1 = sourcing.
RETURN VALUE
None.
SEE ALSO
brdInit, digOut
EXAMPLE
void digOutConfig(unsigned int outputMode);
outputMode = 0x0ff1;
// Outputs OUT15–OUT12 = Sinking
// Outputs OUT11–OUT08 = Sourcing
// Outputs OUT07–OUT04 = Sourcing
// Outputs OUT03–OUT01 = Sinking
// Output OUT00 = Sourcing
Summary of Contents for Smartcat
Page 6: ...Smartcat BL2100 ...
Page 14: ...8 Smartcat BL2100 ...
Page 60: ...54 Smartcat BL2100 ...
Page 78: ...72 Smartcat BL2100 ...
Page 84: ...78 Smartcat BL2100 ...
Page 118: ...112 Smartcat BL2100 ...
Page 124: ...118 Smartcat BL2100 ...
Page 132: ...126 Smartcat BL2100 ...
Page 134: ......