Class TPU_PPWA

  • All Implemented Interfaces:
    Impc555, IntbMpc555HB, Ippc32

    public class TPU_PPWA
    extends Object
    implements IntbMpc555HB
    Period and pulse width measurement (PPWA function) with the TPU-A or TPU-B.
    All 16 channels of TPU-A or TPU-B can be used.
    • Field Detail

      • channel

        int channel
      • pulseWidth

        boolean pulseWidth
      • diff

        int diff
    • Constructor Detail

      • TPU_PPWA

        public TPU_PPWA​(boolean tpuA,
                        int channel,
                        boolean pulseWidth)
        Create a TPU channel for the measurement of period or pulse width.
        Parameters:
        tpuA - true: use TPU-A, false: use TPU-B.
        channel - TPU channel to initialize. Allowed values are 0..15.
        pulseWidth - true: pulse width measurement. false: period measurement.
    • Method Detail

      • read

        public int read()
        The TPU continuously samples the input data. This method reads the last sample.
        The values are in µs.
        Returns:
        Last sample in µs.