|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ridgesoft.intellibrain.IntelliBrainPinPort
public class IntelliBrainPinPort
Base class for all analog and digital ports.
Method Summary | |
---|---|
boolean |
isSet()
Samples the state of the port's signal pin. |
void |
setPullUp(boolean pullUp)
Enables or disables the pull-up resistor on the port if the pull-up is under software controller. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Method Detail |
---|
public boolean isSet()
isSet
in interface DigitalInput
public void setPullUp(boolean pullUp)
The analog and digital ports on the IntelliBrain main board have software controlled pull-up resistors that are part of the ATmega128 microcontroller. The analog ports on the expansion board use the pull-up on analog 3 on the main board. Although the expansion analog ports support the software pull-up, it will only be effective for low capacitance sensors because the pull-up is only enabled when the port is being sampled.
The pull-up resistors on the expansion board digital ports are not software controllable.
A pull-up resistors is useful when passive sensor, such as switch, is attached to an input port. In such an application, the switch would have one lead connected to the port's signal pin and the other lead connected to the port's ground pin. The pull-up resistor would be enabled, causing the voltage of the signal pin to be "pulled" high when the switch is open and pulled to ground (low) when the switch is closed.
This method does nothing if the port is an output.
By default, software controlled pull-ups are disabled.
pullUp
- true enables the pull-up, false disables it
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |