BitIO
 
 
 Bean BitIO
 
General 1-bit Input/Output

Parameters of the bean.

Properties:
  • Bean name - Name of the bean.
  • Pin for I/O - Pin used by this bean.
  • Pin signal - Signal name of the pin.
  • Pull resistor - Setting of the pull resistor (for input mode).

    There are 6 options:
    • no pull resistor: Input without pull resistor is required
    • pull up: Input with pull-up resistor is required
    • pull down: Input with pull-down resistor is required
    • pull up or no pull: Input with pull-up resistor is preferred, but no-pull is acceptable
    • pull down or no pull: Input with pull-down resistor is preferred, but no-pull is acceptable
    • autoselected pull: There are no special requirements for pull resistors

  • Open drain - Setting of the open drain (for output mode).
  • Direction - Direction of the bean: input, output, input/output (the direction of the pin can be switched in run time - see SetDir, SetInput and SetOutput methods).
  • Initialization - Initial settings (after power-on or reset).
    • Init. direction - Initial direction - input or output (available only if the direction = input/output).
    • Init. value - Initial output value = 0 or 1 (available only if the direction = output or input/output).
  • Safe mode - This mode prevents an unwanted output value change that might occur after the change of port direction from input to output. This setting is significant only if the Direction property is set to Input/Output.
    If the Safe mode is disabled, it is not guaranteed that the output value that appears on the output pin after changing the direction from input to output will be the same as the last state before switching direction to input or the value set by output while the pin is set to input direction. This unwanted change is caused by modification of other pins of the same port by read-modify-write operation, for example by another IO bean by one of these methods: PutVal, ClrVal, SetVal, NegVal in case of 1-bit IO bean, or PutVal, PutBit, SetBit, ClrBit, NegBit in case of multi-bits or byte IO bean.
    If the real output value after switching pin direction is not important or it is guaranteed that such unwanted change cannot occur, set this property to 'no' to get more efficient code.
  • Optimization for - Determines whether the driver is optimized for speed or for code size. The code size optimization takes effect on more beans in the project (all beans should be set for code size optimization).
  • The following items are visible only if integration of Processor Expert with Simulink supported.



Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.