|
|
|
Bean
Byte4IO
|
General Four-Bytes Input/Output
Parameters of the bean.
|
Properties:
-
Bean name - Name of the bean.
-
Port 0 - Port used for the first byte (the least significant byte) of this bean.
-
Port 0 signal - Signal name of the port. This item allows to insert signal names (separated by a space or comma) for the corresponding port pins.
-
Port 1 - Port used for the second byte of this bean.
-
Port 1 signal - Signal name of the port. This item allows to insert signal names (separated by a space or comma) for the corresponding port pins.
-
Port 2 - Port used for the third byte of this bean.
-
Port 2 signal - Signal name of the port. This item allows to insert signal names (separated by a space or comma) for the corresponding port pins.
-
Port 3 - Port used for the fourth byte (the most significant byte) of this bean.
-
Port 3 signal - Signal name of the port. This item allows to insert signal names (separated by a space or comma) for the corresponding port pins.
-
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 ports 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 - Initialization output value. (available only if the Direction = output or input/output). You can select in which notation - decimal, hexadecimal, binary - you wish to write the value by clicking the
(D) / (H) / (B) button repeatedly until it shows the first letter of the right notation.
-
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 can be caused by modification of other pins of the same port by read-modify-write operation.
For example the bit-manipulation methods PutBit, SetBit, ClrBit, NegBit of the bean can cause unwanted change on other pins then the pins specified by the methods parameters.
These unwanted changes can also be caused by another IO bean methods using the same port - 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.
-
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.
|
|
|