Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

IOCON Bit 2 (ODR)

The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi

03/02/2020

Posted by:
Thomas Schmieder

Thomas Schmieder Avatar

Hallo Forum

Ich bin Benutzer eines IO PI plus mit 2 Chips 23017 und benötige einen Port im Open Drain-Modus (Open Collector)

Ich habe die Einstellung in Register IOCON A und IOCON B vorgenommen und Bit 2 (ODR) auf (1) (hoch) gesetzt. Dieses Bit ist definitiv für den Open Collector-Modus verantwortlich

Ich schalte den Port mit 0xFF und 0x00 um, aber die Ports schalten immer noch zwischen Ub (0V) und Ub (5V) um. Das ist nicht korrekt, da Open Collector nicht Ub (5V) schaltet

Kann mir bitte jemand helfen? ich programmiere in C++

03/02/2020

Posted by:
andrew

andrew Avatar

Hi Thomas

The only pins on the MCP23017 that support open drain are the two interrupt pins INTA and INTB. The ODR bit in the IOCON register configures the INT pin as an open drain output but it does not control the main IO bus which can only be set as input or output in a push-pull configuration.

To use the outputs on the IO bus as an open drain you will need to use an NPN transistor with the MCP23017 output driving the transistor's gate.

04/02/2020

Posted by:
Thomas Schmieder

Thomas Schmieder Avatar

Thank you for help to AB Electronics UK Tech Support.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout