Memory Chip for Audio Adaptor Board ?

danixdj

Well-known member
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
 
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);
}
 
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?
 
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.
 
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:
Frank's code works on teensy audio board by memory pad without the capacitor.... great work Frank, thank you!!!!!!
 
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...
 
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...
 
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.
 
You know that erasing flash takes a really long time ? Can be a minute or more. You can not overwrite it, like RAM.
 
Back
Top