Electrical – Multiple SPI devices with different logic levels

level-shiftinglevel-translationlogic-levelspi

I'm going to use one of the PIC32MX795F512L SPI peripherals (master), 1 to 4MHz, to communicate with multiple devices (slaves):

  • Wi-Fi module MRF24WG0MA (3.3V);
  • uSD card (3.3V);
  • 9 modules with sensors and ADCs with SPI, on their own boards, connected to the main board through 10cm cables (powered by 5.0V from main board);
  • 3 external optional modules with sensors and ADCs with SPI, on their own boards, connected to the main board through 25cm cables (powered by 5.0V from main board).

I can only use one SPI in the MCU since all other have their pins already in use. I have enough pins for the CS lines.

The sensor boards can have any ADC with SPI, currently I'm using MCP3551 and AD7798. If some ADC does not enable the MISO pin only when their CS input is asserted I will use one input buffer (5V) in their respective board for the MISO line, activated with the CS signal.

I will use a resistor in series with the output of the driving device for line termination as described at TI's LVC Designer's Guide.

For logic level translation I will use:

  • Quadruple bus buffers 74AHCT125 for 3.3V to 5.0V in the main board (SCK, CS and MOSI from MCU to the modules ADCs).

  • Octal bus transceivers 74LVC245A in the main board for 5.0V to 3.3V logic level voltage translation, from the modules ADCs MISO pins.

I've never worked with these buffers before. I can't figure if the 74LVC245A has open-collector outputs. Can I join and connect all the 74LVC245A outputs direct to the MCU MISO pin, like I do with MISO pins from 3.3V peripherals?

Edit: added tags.

Best Answer

The 74LVC245A has tri state outputs; taking the \$\overline {OE}\$ pin low enables communication from A to B or B to A (depending on the level on the DIR pin).

The outputs can have a state of High, Low and High impedance (Z).

You can therefore not tie the outputs together as these are push-pull outputs when enabled.

You could follow the '245A with a multiplexer to use a single pin at the micro.