Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Micro Sd adaptor connection

  1. #1

    Micro Sd adaptor connection

    I would like to use the WavesShare microSD adaptor (https://www.waveshare.com/micro-sd-storage-board.htm) with a 3.2 board. Can I connect this directly to the SPI or do I need additional circuitry, ie. level shifter, resistors, or something?

    Thanks.

  2. #2
    Anyone have an answer?

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,882
    Note, I would imagine that if you hooked up:
    • Teensy 3.3v to waveshare 3.3v;
    • Teensy ground to waveshare ground;
    • Teensy pin 12 to waveshare MISO (DO);
    • Teensy pin 11 to waveshare MOSI (DI);
    • Teensy pin 13 to waveshare SCLK;
    • Any pin to waveshare CS;
    • Don't connect the remaining 3 pins.


    You should be able to use it in normal SPI mode. I don't recall if SDIO mode is supported for anything except the built-in SD drives on the Teensy 3.5, 3.6, and 4.1 (and the solder pads for the 4.0).

    Note the examples in the SD sub directory (listfiles, cardinfo, etc.) all use pin 4 for the CS pin, so at least initially, you would want to use that.

    If it doesn't work, try swapping the MISO and MOSI wires. Some devices label the wires based on the direction of information to the device, rather than from the microprocessor.

    Note, micro SD cards come in 3 flavors (original, HC, and XC). The original format supported up to 2 gigabyte cards. The HC format supports up to 32 gigabyte cards. The XC format supports 64 gigabyte cards and greater. I didn't notice whether the Waveshare documented mentioned HC or not. So to start out with, start with a 1 gigabyte card. I suspect that it likely supports HC cards. Outside of original/HC/XC there is a lot of variation in terms of extra speed modes for things like cameras (UHS-1, UHS-2, etc.). However, all cards should support the common (slower) subset that Teensy supports.

    Note, XC cards are problematical in that it does not use the standard FAT32 filesystem (it uses exFat). Whether the standard library supports exFat, I don't know. In any case, try it first with a SD card 2 gigiabytes or smaller (if you can find them). Then try it out with cards 32 gigabytes or smaller.

  4. #4
    Thank Michael! Got it working.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •