0
\$\begingroup\$

I'm designing a PCB that uses Analog Devices' MAX7301AAX GPIO Expander IC to expand the Raspberry PI's GPIOs.

Digikey MAX7301

The reason I'm using this IC is that my application requires a lot of output pins for SPI's CHIP SELECT and digital switches to output HIGH/LOW.

For example: P4 to P14, each pin is a Chip Select to enable an device through SPI; and P15 to P25, each pin is able to output HIGH(>2V) or LOW(<0.8V) to control digital switches ON/OFF. fig-2

I have a few concerns that can't find answers from the datasheet:

  1. Can these GPIOs pins(p4-p31) have multiple pins outputing HIGH(V>2.0V) at the same time to turn on multiple switches at the same time? ex. p5,p7,p9,p11 output HIGH at the same time.

  2. Will input a new command reset the previous command? ex. first set p5,p7,p9,p11 as HIGH, will a new command for p28 reset previous pins' status? In other words, does each pin act as an independent GPIO and does not intefer with other pin's commands?

Thank you for your answers!

enter image description here

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

The datasheet says:

The MAX7301 ... provides microprocessors with up to 28 ports. Each port is individually user configurable to either a logic input or logic output. Each port can be configured either as a push-pull logic output capable of sinking 10mA and sourcing 4.5mA, or a Schmitt logic input with optional internal pullup.

It does not mention any additional restrictions, except for the total sink current.

\$\endgroup\$
0
\$\begingroup\$

Can these GPIOs pins(p4-p31) have multiple pins outputing HIGH(V>2.0V) at the same time to turn on multiple switches at the same time?

Yes, you can individually set each output to HIGH or LOW without worrying about what the other outputs are set to.

Generally, if the datasheet provides commands to set each pin HIGH or LOW, and doesn't say you can't set them all HIGH, then you can set them all HIGH. If there was a restriction like that, then the datasheet would say.

Will input a new command reset the previous command? ex. first set p5,p7,p9,p11 as HIGH, will a new command for p28 reset previous pins' status? In other words, does each pin act as an independent GPIO and does not interfere with other pin's commands?

You can use it so that each pin acts as an independent GPIO and does not interfere with other pin's commands.

This is in the datasheet, Table 3.

When you set the configuration, you have to configure a group of 4 pins at once. Usually you will configure all pins at power-on, so you want to configure all pins. If for some reason you later want to change the configuration of just one pin, you can do that by setting the configuration of 4 pins, but setting 3 of them to the values that they're already set to.

To read or write a pin, you can use commands 0x24 to 0x3F to read or write a single pin at a time.

(If you wanted to read or write multiple pins at once, there are separate commands - 0x40 to 0x5E - for that. But you don't have to use those if you don't want to. And those commands only affect the pins that they specifically say they are changing).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.