Class MPIOSM_DIO

  • All Implemented Interfaces:
    DigitalInput, DigitalOutput, Impc555, IntbMpc555HB, Ippc32

    public class MPIOSM_DIO
    extends Object
    implements IntbMpc555HB, DigitalOutput
    Driver to use pins on the MPIOSM (MIOS 16-bit parallel port I/O submodule) as digital in- and outputs. The MPIOSM provides 16 independent I/Os (0..15).

    Additional informations for using this driver with the NTB MPC555 header board:
    • Pin numbers 13 and 14 of the MPIOSM are used for the CAN-Controller on the header board and must not be used if the controller is assembled!
    • MPIOSM pin 15 is connected to the led D1 on the header board and can only be used as an output!
    For further informations please read the corresponding documentation on the NTB Infoportal.
    • Constructor Detail

      • MPIOSM_DIO

        public MPIOSM_DIO​(int channel,
                          boolean out)
        Create a pin as in- or output.
        Parameters:
        channel - MPIOSM pin to initialize. Allowed numbers are 0..15.
        out - Pin usage: true configures the pin as output, false as input.
    • Method Detail

      • get

        public boolean get()
        Description copied from interface: DigitalInput
        Returns the current state of the TTL signal on the given pin.
        Specified by:
        get in interface DigitalInput
        Returns:
        the current state of the TTL at the given pin. true means logic 1 and false logic 0.
      • set

        public void set​(boolean val)
        Description copied from interface: DigitalOutput
        Set the TTL signal at the given pin.
        Specified by:
        set in interface DigitalOutput
        Parameters:
        val - Value to set. true means logic 1 and false logic 0.
      • dir

        public void dir​(boolean out)
        Sets the direction of a given pin to input or output.
        Parameters:
        out - Pin usage: true configures the pin as output, false as input.