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

Thread: Memory Chip for Audio Adaptor Board ?

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

    Memory Chip for Audio Adaptor Board ?

    Hi, it's possibile to use a different chip for more memory on teensy audio board?

    23LC1024 is 1mbit but now there are available SOIC chip that have more memory... so we can added this memory on the bottom side of audio board?

    We need to change the code of delay ext for using more than 1mbit?

    Thank you

    Dani

  2. #2
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    193
    Which chip did you want to use?

  3. #3
    Senior Member
    Join Date
    Oct 2016
    Posts
    170
    Quote Originally Posted by Blackaddr View Post
    Which chip did you want to use?
    F-RAM 1mbit SOIC-8 SPI 512 x 8

    23LC1024 is 128 x 8

    i must to change memsize = 65536; to memsize =262144; in effect_delay_ext.cpp i think...

    Code:
    void AudioEffectDelayExternal::initialize(AudioEffectDelayMemoryType_t type, uint32_t samples)
    {
    	uint32_t memsize, avail;
    
    	activemask = 0;
    	head_offset = 0;
    	memory_type = type;
    	if (type == AUDIO_MEMORY_23LC1024) {
    #ifdef INTERNAL_TEST
    		memsize = 8000;
    #else
    		memsize = 65536;
    #endif
    		pinMode(SPIRAM_CS_PIN, OUTPUT);
    		digitalWriteFast(SPIRAM_CS_PIN, HIGH);
    	} else if (type == AUDIO_MEMORY_MEMORYBOARD) {
    		memsize = 393216;
    		pinMode(MEMBOARD_CS0_PIN, OUTPUT);
    		pinMode(MEMBOARD_CS1_PIN, OUTPUT);
    		pinMode(MEMBOARD_CS2_PIN, OUTPUT);
    		digitalWriteFast(MEMBOARD_CS0_PIN, LOW);
    		digitalWriteFast(MEMBOARD_CS1_PIN, LOW);
    		digitalWriteFast(MEMBOARD_CS2_PIN, LOW);
    	} else {
    		return;
    	}
    	avail = memsize - allocated[type];
    	if (avail < AUDIO_BLOCK_SAMPLES*2+1) {
    		memory_type = AUDIO_MEMORY_UNDEFINED;
    		return;
    	}
    	if (samples > avail) samples = avail;
    	memory_begin = allocated[type];
    	allocated[type] += samples;
    	memory_length = samples;
    
    	SPI.setMOSI(SPIRAM_MOSI_PIN);
    	SPI.setMISO(SPIRAM_MISO_PIN);
    	SPI.setSCK(SPIRAM_SCK_PIN);
    
    	SPI.begin();
    	zero(0, memory_length);
    }

  4. #4
    Senior Member
    Join Date
    Oct 2016
    Posts
    170
    I'm trying with CY15B104Q 4mbit F-RAM but don't work...

    Paul can you help me?

  5. #5
    Senior Member
    Join Date
    Oct 2016
    Posts
    170
    We can't use the standard code of 23LC1024 because F-RAM is fast like a RAM but it needs the flash spi command.. so a mod of audio library..

    Someone can help me?

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,700
    Quote Originally Posted by danixdj View Post
    I'm trying with CY15B104Q 4mbit F-RAM but don't work...

    Paul can you help me?
    Not really, there's not much I can do to help. That chip isn't supported. I don't have that chip. Even if I did, I have a lot of other much higher priority tasks waiting. I simply can not put engineering time into supporting this FRAM chip.

    If you want to dig into the code, you can at least see the code currently supports 2 different hardware configs. Maybe you can add a third hardware? If the FRAM requires different commands from the 23LC1024 (which *does* use command codes), you'll need to add that code with if-else checks for the hardware type.

  7. #7
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,514
    Quote Originally Posted by danixdj View Post

    Someone can help me?
    I can help if you send me such a chip

  8. #8
    Senior Member
    Join Date
    Oct 2016
    Posts
    170
    Ok Frank!!!!
    Give me your address (PM)

  9. #9
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,514
    Got your chip working:

    https://github.com/PaulStoffregen/Audio/pull/246

    It was a bit difficult at first - the code was easy, but it did not work until I added a capacitor to vcc<->gnd. I had a 100uF at hand - and with it, it works (Teensy 3.2). I think a smaller one would work too.
    Code was done in 30 minutes, but identifying the problem took much longer...
    Last edited by Frank B; 08-26-2017 at 12:54 PM.

  10. #10
    Senior Member
    Join Date
    Oct 2016
    Posts
    170
    Frank's code works on teensy audio board by memory pad without the capacitor.... great work Frank, thank you!!!!!!

  11. #11
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,514
    Quote Originally Posted by danixdj View Post
    Frank's code works on teensy audio board by memory pad without the capacitor.... great work Frank, thank you!!!!!!
    You are welcome !
    Thank you for the chips.

  12. #12
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,514
    6 of them on the Memoryboard would give 35.6 seconds.. (code for that still needs to be added - that's a trivial task now)
    Unfortunately, quite expensive...

  13. #13
    Senior Member
    Join Date
    Oct 2016
    Posts
    170
    Quote Originally Posted by Frank B View Post
    6 of them on the Memoryboard would give 35.6 seconds.. (code for that still needs to be added - that's a trivial task now)
    Unfortunately, quite expensive...
    Yes but now we can work to new features like live recordings and sampler, and the reverb object should be able to use the ext chip because it need a lot of memory..

    It's a new way...

  14. #14
    Junior Member
    Join Date
    Sep 2017
    Posts
    2
    But one on a Teensy Audio Adapter Board would be very cost effective for nearly 6 seconds delay.
    Seems like a good way to make a small multi-effects board for keyboards, etc.

  15. #15
    Junior Member
    Join Date
    Sep 2015
    Location
    London
    Posts
    8
    256Mbit Should give 6 minutes at 44.1kHz 16 bit stereo. Flash Memory 256Mb, 3V, 133Mhz SPI NOR Flash - S25FL256SAGNFI000
    http://uk.rs-online.com/web/p/flash-...chips/1242652/ 2.85
    They're WSON8 package and as such are not easy to solder onto the audio adapter board, but I have used them successfully on it. No software changes required.
    Note I haven't filled the whole 32MB yet....

  16. #16
    Junior Member
    Join Date
    Sep 2017
    Posts
    2
    Quote Originally Posted by BuzzBang View Post
    256Mbit Should give 6 minutes at 44.1kHz 16 bit stereo. Flash Memory 256Mb, 3V, 133Mhz SPI NOR Flash - S25FL256SAGNFI000
    That will fail if there are too many write cycles.
    Great for wavetables & sample playback though.

  17. #17
    Junior Member
    Join Date
    Sep 2015
    Location
    London
    Posts
    8
    Thanks for the info, good to know. My use case is sample playback in this instance thankfully

  18. #18
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,514
    You know that erasing flash takes a really long time ? Can be a minute or more. You can not overwrite it, like RAM.

Posting Permissions

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