3
\$\begingroup\$

I need to generate a bunch of chip selects for a SPI bus that I want to use on a project. I will use a 36 position (similar to PCIExpress = cheap) card edge connector and etc.

The bus is simple :

Pin 01 -> Clock
Pin 02 -> MOSI
Pin 03 -> MISO
Pin 04 -> CS#1
Pin 05 -> CS#2
Pin 06 -> CS#3
Pin 07 -> CS#4
Pin 08 -> CS#5
Pin 09 -> CS#6
Pin 10 -> CS#7
Pin 11 -> CS#8
Pin 12 -> CS#9
Pin 13 -> CS#10
Pin 14 -> CS#11
Pin 15 -> CS#12
Pin 16 -> CS#13
Pin 17 -> CS#14
Pin 18 -> CS#15

Other pins on the card edge connector are assorted GND and VCC pins.

I need to generate a chip select from 4 GPIO pins on the microcontroller, in order to select a SPI slave from various devices etc.

A long time ago this would be made using a simple 74LS154 device (1-of-16 decoder). The chosen microcontroller is the only 3.3 V device (EZ80), and I find it hard to find a 3.3 V equivalent to 74LS154.

Please tell me where can I find a 3.3 V 74LS154 device.

Edit:

looking the datasheet from the ez80, its SPI can only do systemclock/2 speed. Its reasonable to think that the max speed at which the chip select pins change is equal to the character rate, that means (50 MHz / 2) / 8 or 3.125MHz. So there is no need for all that speed (50 MHz).

\$\endgroup\$
6
  • \$\begingroup\$ nxp.com/documents/data_sheet/74HC_HCT154.pdf \$\endgroup\$ – Tom Carpenter Jun 21 '16 at 0:07
  • \$\begingroup\$ There are many different 74xx families. The LS variant is not the right one for low voltage. The HC family goes down to 2V. Not sure if it can do 50MHz though - probably not given that its outputs have a rise/fall time of 15ns. \$\endgroup\$ – Tom Carpenter Jun 21 '16 at 0:08
  • 3
    \$\begingroup\$ @Jorge - "Please tell me where can I find a 3.3V/50mhz 74LS154 device" Are you sure you need the '154 device to operate at 50 MHz? (a) Just because your MCU runs at up to 50 MHz does not mean that any external clocks generated by the CPU can run at that speed; and (b) the '154 device is being used for CS, not for SCLK. Therefore even if SCLK ran at CPU clock speed (which I doubt), then CS would not do so. In short - I wonder if your requirement for 50 MHz operation of the '154 is valid, or a misunderstanding of what is needed? \$\endgroup\$ – SamGibson Jun 21 '16 at 0:39
  • \$\begingroup\$ @SamGibson: you are correct. \$\endgroup\$ – Jorge Aldo Jun 21 '16 at 0:40
  • 1
    \$\begingroup\$ are your 15 devices going to play nice enough to share one miso/mosi set? \$\endgroup\$ – old_timer Jun 21 '16 at 0:54
4
\$\begingroup\$

The 74LS family is, by definition, 5V only. If you're working with 3.3V parts, ignore it.

The 74HC family is 3.3V compatible. The 74HC154 may be suitable for your needs. However, note that it is only available in surface-mount packages; the DIP 74HC154 was discontinued by most manufacturers some time ago.

Another option is a pair of 74HC138 3-to-8 decoders. These parts have both active-high and active-low enable pins, so they can be combined to emulate a 4-to-16 decoder.

If the speeds of the 74HC family aren't sufficient for your needs, you can step up to the 74AHC family, which is also 3.3V only. There is no 74AHC version of the '154, but the '138 is available.

\$\endgroup\$
5
  • \$\begingroup\$ unfortunately this looks like the only choice... \$\endgroup\$ – Jorge Aldo Jun 21 '16 at 0:14
  • 1
    \$\begingroup\$ The AHC still has over 10ns rise/fall time for 3.3V - means the top speed for anything useful is probably only 30MHz, maybe 40MHz. Although the TI site says nominal Fmax of 100MHz, that is for 5V which has <5ns rise/fall. \$\endgroup\$ – Tom Carpenter Jun 21 '16 at 0:17
  • 1
    \$\begingroup\$ @TomCarpenter Good point. There are other, faster logic families available as well; whether the OP needs them will depend on exactly how fast these chip selects need to be. \$\endgroup\$ – user39382 Jun 21 '16 at 0:22
  • 1
    \$\begingroup\$ CS change at least 8 times slower than the clock, MISO and MOSI pins (from the top of my head, ez80 can do only sysclock / 2 on the spi, plus the cs changes per word, not per bit), so, at 50mhz this means 50/2/8 = 3.125 mhz... \$\endgroup\$ – Jorge Aldo Jun 21 '16 at 0:34
  • 1
    \$\begingroup\$ in other words, my question makes no sense :P sorry. \$\endgroup\$ – Jorge Aldo Jun 21 '16 at 0:44
2
\$\begingroup\$

High-speed 3.3V logic is right up the alley of the ALVC family, if I recall correctly. Check out the very helpful TI Logic Selection Guide for further details. It'll give you the overview of voltages:

enter image description here

ALVC in specific:

enter image description here

And AVC:

enter image description here

And many of the low-voltage, high performance parts will tolerate 3.3V input as well, if you can tolerate lower-voltage outputs.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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