Skip to content

How to use digital pins on ppk2 #55

Open

Description

@maddy81

Hello,

I wnat to know how we can use the digital pins of the ppk2 I want to send a high signal from my stm32 to ppk2 and than it should start reading the current drawn by my stm32. I am using the ppk2 in source mode. Kindly if someone know please guide.

Thanks in advance

Activity

  1. RoyBellingan commented on Oct 7, 2025

    @RoyBellingan

    I am having issue too understanding how to use the digital IN, the first issue, is not clear what is the treshold voltage, the second I connected the Vout to D0, set voltage to 3.3 and looks like nothing is beeing detected.

  2. AntoineBricard commented on Jul 22, 2026

    @AntoineBricard

    Hi,
    I also would like to use the LOGIC PORT pin to read the state of button. Is it possible ?
    I wire ppk2 as below:
    Image

    About the soft environment:

    • Windows 10
    • python 3.14
    • ppk2_api==0.9.2

    And below is the code I'm using:

    def read_logic_port(self):
            # Clear buffer to ensure fresh data
            self.ppk2_device.get_data()
            time.sleep(0.1)
    
            self.ppk2_device.start_measuring()
            time.sleep(0.2)
    
            val = self.ppk2_device.get_data()
            if val !=b'':
                sample, raw_digital = self.ppk2_device.get_samples(val) # First element of list is for ADC
    
            digital_channels = self.ppk2_device.digital_channels(raw_digital)
            for ch in digital_channels:
                # Print last 10 values of each channel
                print(f"Logic port: {ch[-10:]}")
            print()
    
            self.ppk2_device.stop_measuring()
    
            #print(f"Logic port: {samples}")
    

    The PPK2 is set as "Ampere meter" with source voltage=5000mV.
    Toggle DUT power is disabled.

    My issue is that the pin level doesn't change and is always indicated as array of 0. Did I miss something ?

    Best regards,
    Antoine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions