Enabling and Setting a ccOutputLine
You must enable your output line before using any other function on it:
oline.enable(true);
To set the output line high, use the set() function:
oline.set(true); // sets the line high
oline.set(false); // sets the line low
- Invoking set(true) has different effects on TTL and opto-isolated lines:
- For TTL output and bidirectional lines, set(true) sets the TTL high state (+5 V)
- For opto-isolated lines, set(true) enables the no-current-flowing state (the LED inside the opto-isolator is OFF, and thus the circuit is open and not transmitting a signal through the opto-isolator)
The meanings of set(false) are as follows:
- For TTL output and bidirectional lines, set(false) sets the TTL low state (0 V)
- For opto-isolated lines, set(false) enables the current-flowing state (the LED inside the opto-isolator is ON, thus the circuit is closed and is transmitting a signal through the opto-isolator)