RoboJDETM v2.0

com.ridgesoft.intellibrain
Class IntelliBrainPinPort

java.lang.Object
  extended by com.ridgesoft.intellibrain.IntelliBrainPinPort
All Implemented Interfaces:
DigitalInput
Direct Known Subclasses:
IntelliBrainAnalogInput, IntelliBrainDigitalIO

public class IntelliBrainPinPort
extends Object
implements DigitalInput

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

isSet

public boolean isSet()
Samples the state of the port's signal pin.

Specified by:
isSet in interface DigitalInput
Returns:
true if the pin is high, false if the pin is low

setPullUp

public void setPullUp(boolean pullUp)
Enables or disables the pull-up resistor on the port if the pull-up is under software controller.

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.

Parameters:
pullUp - true enables the pull-up, false disables it

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com