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

Thread: Audio Adaptor Rev D. and SD CARD pin.

  1. #1
    Senior Member
    Join Date
    Oct 2016
    Posts
    206

    Audio Adaptor Rev D. and SD CARD pin.

    Hi, I am confused about which pins to use for the SD CARD adapter on the Audio Adaptor Rev. D

    On the PJRC site the pins indicated are:

    10,11,12,13 Rev. D
    7,10,12,14 Rec. C

    But I can test my SD CARD on the T4 + Audio Board Rev. D using Rev. C pins (only using Rev. C pins) and it's not available using Rev. D pins.

    I'm working on a new project and I need to know what's the pins I can use for other features.

    I have the same situation with all the sketch (like Audio Recorder example or SD Card Info)

    This code works fine:

    Code:
    const int chipSelect = 10;
    SPI.setMOSI(7);
    SPI.setSCK(14);
    But the link https://www.pjrc.com/store/teensy3_audio.html should be:

    Code:
    const int chipSelect = 11;
    SPI.setMOSI(10);
    SPI.setSCK(13);


    Thank u

    Dani

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,536
    On Teensy 4, SPI.setMOSI(7) and SPI.setSCK(14) have no effect, because those pins can't work. Pins 11 and 13 are still used.

    So the Rev D audio shield SD card still works on Teensy 4 even with those lines in the code, because it's ignoring them and actually using pins 11-13 for SPI.

  3. #3
    Senior Member
    Join Date
    Oct 2016
    Posts
    206
    So I must use the code of Rev C but I have the pin14 free for another use? right?

    Code:
    const int chipSelect = 10;
    SPI.setMOSI(7);
    SPI.setSCK(14);
    but I can add an analog read on the PIN 14 for a potentiometer for example?

  4. #4
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,460
    I can confirm the rev D audio adapter only uses pins 6,7,8,10,11,12,13,15,18,19,20,21,23, GND and 3V3 as per the
    pinout table and schematic given in the docs: https://www.pjrc.com/store/teensy3_audio.html

    (I've got an unpopulated one and a hand lens to double check!)
    If there's no memory chip mounted or µSDcard plugged in the SPI pins are unused too, other than 10k pullups on 6 and 10.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,536
    Quote Originally Posted by danixdj View Post
    So I must use the code of Rev C but I have the pin14 free for another use? right?
    Yes, pin 14 isn't used on T4, even if your code has SPI.setSCK(14). You could connect an analog voltage from a pot to pin 14. SCK won't interfere. And if you have the Rev D audio shield, pin 14 isn't connected.

    If you have the Rev C audio shield (exactly what code and hardware you have isn't clear, at least to me) then nothing on the audio shield works with T4 unless you use wires to route the signals to the correct locations. Rev C is designed to connect all the signals to the places used on T3.

    I hope you can understand how asking these narrowly focused questions without giving a clear picture of what you are really using or what you're trying to accomplish makes answering very difficult. Hopefully this message helps, but because I don't even know which hardware you really have or what you need to do, the very best answer would be the check the pinout and schematic info on the audio shield page.

  6. #6
    Senior Member
    Join Date
    Oct 2016
    Posts
    206
    thanks Paul, it's all clear 👌

Posting Permissions

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