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

Thread: Audio shield flash memory (SOIC-8)

  1. #1
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Ayer Massachussetts

    Question Audio shield flash memory (SOIC-8)

    I was thinking of tricking out my Teensy 4.0, and adding flash memory to the audio shield. I also would be adding standalone flash if I'm not using the shield.

    In the past, I would use the prop shield when I wanted flash memory, but with the Teensy 4.0 not having DACs and the prop shield colliding with the Teensy 4.0 I2S pins, it is less desirable to use the prop shield.

    Before ordering, I wanted to make sure I was ordering the right part. I'm not as familiar with the surface mount sizes. I believe what the audio shield uses is SOIC-8. Is this correct?

    From the audio shield page at PJRC, it looks like this would be compatible with the version B/C/D audio shields. Is this correct?

    And to bring out flash without the audio shield, I was thinking about using this SOIC-8 to DIP PCB. Would this work?

    Of course with the T4, another option is to use the micro SD card pins under the T4. I wonder if there is something that has a FFC 8-pin cable on one end, and a SOIC-8 mounting area on the other in the correct pinout. Or perhaps micro SD card to SOIC-8.

    This of course assumes, I can convince myself to do such small soldering. :-)

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    These are the one DigiKey sent me that I have on hand:
    > It is no longer in stock.

    I just soldered one on the T4's RevD board I just got and it worked. Not sure if that is exact match to one linked on PJRC Audio page?

    The one linked in OP seems similar - just faster and in stock.

    Looking at the one I got it has your parts listed at the page bottom and also this one

    They all seem similar NOR FLASH - just the current stock is capable of higher speeds

  3. #3
    I was just looking for something similar. But I was considering using a SOIC-16 breakout with a bigger chip with more memory.

  4. #4
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Ayer Massachussetts


    I had forgotten about this thread, until I found it searching for something else.

    I did buy the flash memory and the Sparkfun adapters. I was able to solder one flash memory to the Sparcfun SOIC-8 card and another to one of my version B audio adapters. Here is what I bought:

    Using Teensy Transfer ( I am able to update the flash memory and download/upload files to the flash memory (on the 3.2/3.6, Teensy Transfer does not run on Teensy 4.0 since T 4.0 doesn't support RAW HID USB at this time).

    I've used both the normal transfer to a Teensy 3.2 that has the prop shield attached, and the flash memory soldered to the Sparkfun adapter, and also to the Teensy 3.6 with a version B audio shield, and the flash memory soldered to the audio shield.

    Here is what Teensy Transfer -i produces for the stand-alone flash memory:

    ID    : EF 40 18
    Serial: E4 68 44 80 8F 53 1B 38
    Size  : 16777216 Bytes
    And for reference, this is that the prop shield lists:
    ID    : EF 40 17
    Serial: D1 65 38 25 47 1C 46 29
    Size  : 8388608 Bytes
    If I hook the flash + DIP chip to the Teensy 3.2 + prop shield, I can play music through the prop shield amplifier hooking it up to a simple speaker. Note, the other two pins on the DIP adapter must attached to 3.3v for proper usage.

    Similarly, if I hook up the Teensy 3.6 to the memory, and have the two DACs feed into an amplifier and two speakers (note RAW files are mono only), I can play the songs.

    However, so far, I've not been able to use the audio shield to play any songs, either using the flash memory soldered to the revision B audio port (i.e. pin 6 is the CS pin) or the stand-alone flash memory (pin 4).

    My first revision D audio adapter has gone missing, and I haven't yet soldered up the second revision D board I just got. I'll do that shortly. I hope the problem is just the alternate SPI pins used by the revision B adapter.

    If you are curious, here is the code I've been trying:

    // Simple WAV file player example
    // Three types of output may be used, by configuring the code below.
    //   1: Digital I2S - Normally used with the audio shield:
    //   2: Digital S/PDIF - Connect pin 22 to a S/PDIF transmitter
    //   3: Analog DAC - Connect the DAC pin to an amplified speaker
    // To configure the output type, first uncomment one of the three
    // output objects.  If not using the audio shield, comment out
    // the sgtl5000_1 lines in setup(), so it does not wait forever
    // trying to configure the SGTL5000 codec chip.
    // The SD card may connect to different pins, depending on the
    // hardware you are using.  Uncomment or configure the SD card
    // pins to match your hardware.
    // Data files to put on your SD card can be downloaded here:
    // This example code is in the public domain.
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    AudioPlaySerialflashRaw		playRaw;
    #define USE_PROP_SHIELD		0
    #define USE_ANALOG_DAC		0
    #define USE_ANALOG_DACS		0
    #define USE_SPDIF		0
    #define USE_AUDIO_SHIELD	1
    #define USE_I2S			1
    #define USE_AUDIO_SPI		0
    // Output devices
    AudioOutputI2S			audioOutput;
    AudioControlSGTL5000		sgtl5000;
    #if USE_SPDIF
    AudioOutputSPDIF		audioOutput;
    AudioOutputAnalog		audioOutput;
    AudioOutputAnalogStereo		audioOutput;
    AudioConnection			patchCord1 (playRaw, 0, audioOutput, 0);
    // Use these with the Teensy Audio Shield
    #if (USE_AUDIO_SHIELD || USE_AUDIO_SPI) && !defined(__IMXRT1062__)
    #define MOSI_PIN		 7
    #define SCK_PIN			14
    #define MOSI_PIN		11
    #define SCK_PIN			13
    //#define FLASH_CHIP_SELECT	 4
    #define FLASH_CHIP_SELECT	 6
    #define PROP_SHIELD_AUDIO	 5
    void setup ()
      while (!Serial && millis () < 3000UL)
      Serial.begin (9600);
      //uncomment these if you have other SPI chips connected
      //to keep them disabled while using only SerialFlash
      pinMode (10, INPUT_PULLUP);
      if (MOSI_PIN != 7)
        SPI.setMOSI (MOSI_PIN);
      if (SCK_PIN != 13)
        SPI.setSCK (SCK_PIN);
      SPI.begin ();
      eeprom_initialize ();
      // Audio connections require memory to work.  For more
      // detailed information, see the MemoryAndCpuUsage example
      AudioMemory (8);
      // Comment these out if not using the audio adaptor board.
      // This may wait forever if the SDA & SCL pins lack
      // pullup resistors
      sgtl5000.enable ();
      sgtl5000.volume (0.5f);
      // Enable the amplifier on the prop shield
      digitalWrite (PROP_SHIELD_AUDIO, HIGH);
      Serial.printf ("MOSI = %d, SCK = %d, CS = %d%s%s%s%s%s%s%s\n",
    		 (USE_I2S || USE_AUDIO_SHIELD)		? ", i2s"		: "",
    		 (USE_ANALOG_DAC || USE_PROP_SHIELD)	? ", dac"		: "",
    		 USE_ANALOG_DACS			? ", dacs"		: "",
    		 USE_SPDIF				? ", S/PDIF"		: "",
    		 USE_AUDIO_SHIELD			? ", audio shield"	: "",
    		 USE_PROP_SHIELD			? ", prop shield"	: "",
    		 USE_AUDIO_SPI				? ", audio spi"		: "");
      // Start SerialFlash
      if (!SerialFlash.begin (FLASH_CHIP_SELECT)) {
        while (1)
    	Serial.println ("Cannot access SPI Flash chip");
    	delay (1000);
    void playFile (const char *filename)
      Serial.printf ("Playing file: %s\n", filename);
      // Start playing the file.  This sketch continues to
      // run while the file plays. (filename);
      // A brief delay for the library read WAV info
      delay (5);
      // Simply wait for the file to finish playing.
      while (playRaw.isPlaying ()) {
        // uncomment these lines if you audio shield
        // has the optional volume pot soldered
        //float vol = analogRead(15);
        //vol = vol / 1024;
        // sgtl5000_1.volume(vol);
    void loop() {
      playFile ("SDTEST1.RAW");	// filenames are always uppercase 8.3 format
      delay (500);
      playFile ("SDTEST2.RAW");
      delay (500);
      playFile ("SDTEST3.RAW");
      delay (500);
      playFile ("SDTEST4.RAW");
      delay (1500);
    Last edited by MichaelMeissner; 11-15-2019 at 02:22 PM.

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Good luck on the new Rev D adapter - both not losing it and in having it work

    I soldered the older slower standard W25Q128FV and found it to work with the minimal test on the Rev D. This post suggests you can expect the newer faster version to work.

    Quote Originally Posted by jeraymond View Post
    I ordered the W25Q128JVSIM and can confirm this chip does indeed work with the Audio Adapter board. I'm able to successfully play raw files from this flash memory chip.

    It'd be useful to update the Audio Adapter Board page to reference the W25Q128JV chips since the W25Q128FV ones have been discontinued.

Posting Permissions

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