How to change GPIO level in the control panel?

Is it possible to change the default level for a GPIO?

I'm using the ADAU1701, and want to drive a LED directly from MP4. But it has reverse polarity from what I would have expected.

In the register section, there is a small blue button for every GPIO, and it is set to LOW ... but there does not seem any way to change this?

Have I misunderstood something

Thanks and Kind regards Mads

  • 0
    •  Analog Employees 
    on Feb 23, 2021 7:11 PM 1 month ago

    Hello MadsM,

    That field in the graphics is showing the state of the GPIO input not output. So you cannot change it. 

    If you need to change the polarity you do it in the DSP program. 

    That said, it is really not very good to drive an LED directly from the pin. It is best to use a transistor or buffer. Here is what it says about this in the datasheet:

    The general-purpose input/output (GPIO) pins can be used as either inputs or outputs. These pins are readable and can be set either through the control interface or directly by the SigmaDSP core. When set as inputs, these pins can be used with push-button switches or rotary encoders to control DSP program settings. Digital outputs can be used to drive LEDs or external logic to indicate the status of internal signals and control other devices. Examples of this use include indicating signal overload, signal present, and button press confirmation.
    When set as an output, each pin can typically drive 2 mA. This is enough current to directly drive some high efficiency LEDs. Standard LEDs require about 20 mA of current and can be driven from a GPIO output with an external transistor or buffer. Because of issues that could arise from simultaneously driving or sinking a large current on many pins, care should be taken in the application design to avoid connecting high efficiency LEDs directly to many or all of the MPx pins. If many LEDs are required, use an external driver.
    When the GPIO pins are set as open-collector outputs, they should be pulled up to a maximum voltage of 3.3 V (the voltage on IOVDD).

    Dave T