Serial-control multiplexer expands SPI chip selects

March 23, 1998
SPI and Microwire buses offer a popular and convenient means for minimizing the number of interconnect wires required in connecting smart peripherals to a microcontroller. These standard synchronous buses comprise a serial-clock, data-in, and data-out...

SPI and Microwire buses offer a popular and convenient means for minimizing the number of interconnect wires required in connecting smart peripherals to a microcontroller. These standard synchronous buses comprise a serial-clock, data-in, and data-out line in addition to a chip-select line for each peripheral.

One chip select per device, however, can quickly use up the precious port pins in a microprocessor system. To ease this situation, the dual fourchannel analog multiplexer (an SPI device itself) multiplexes a single port pin (PC0) to provide chip selects for four other SPI peripherals in the system (see the figure). A second port pin (PC1) selects the multiplexer.

All switches in this multiplexer are bidirectional. Its two sections are independent, and either output (unlike those of conventional differential multiplexers) can be programmed to connect to any, all, or none of its four input channels. Thus, the second (top) section is employed, independently of the lower section, to expand the number of analog channels available to the microcontroller. The microcontroller’s internal multiplexer supports eight channels, so this scheme (using one to get four more) yields a total of 11 input channels.

By operating “backwards,” the lower 4:1 multiplexer routes the PC0 signal to a selected peripheral’s —CS input. Driving PC0 low selects that peripheral for receiving SPI data, and driving PC0 high de-selects all four peripherals. Read and write sequences are the same as in regular SPI systems, except that the chip selects must be set up beforehand. PC0 then goes low, the read/write operation is executed, and PC0 returns high to de-select the device.

This procedure isn’t burdensome in practice. Typical SPI systems include a device that’s serviced often (such as a display driver), and several others that require service only occasionally (such as EEPROMs or real-time clocks). Thus, the chip-select multiplexer can leave the heavily used device selected most of the time, and perform an update only when selecting a new device.

To accommodate other combinations of chip-select and analog expansion lines, you can replace the MAX350 with a similar device (the MAX395), whose eight serially-addressed SPST switches can be configured as required.

Sponsored Recommendations

What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!