To confirm, I have just modified my PCB to connect my SRAM chips to pins 20,21,22 and 23.
Everything is functioning with a SPI clock at 10MHz And talking to all 4 SRAMs.
I have pin 10 set as output and at HIGH state but nothing connected to it...
As an update, I changed the first CS pin to 20 to see if all four chips would start working. It looks like this does work, but the Way my circuit board is setup currently, I have to break the connection on pin 21 so can not confirm definitely...
I have edited the test code to use all 4 of the SRAM chips that I have, using the SPI hardware interface with SPI Mode 0.
The chips are connected using CS on pins 10, 21, 22 and 23 respectively.
I have 3 of the chips running, those connected to...
Thanks,
My issue I think is related to timing of the signals, which is why I tried the bit banging approach to try and identify what was occurring. Even when I reduced the SPI bit rate down, everything was still messed up.
I will try changing...
Further investigation results in the following.
I have written an SPI interface using bit banging of the MOSI, MISO and SCK lines on the teensy to try and find why multiple SRAM chips stop working. Oddly this bit banging approach works.
However...
What is the correct order between cs and begintransaction?
I originally had the CS state change before the begin transaction and the CS state change after the end transaction. However I saw something whilst trying to solve this that the CS...
Thanks for the comments.
Normally, I would use a define for the PIN numbers, This was a very crude test program to try and debug the system.
An interesting development. The issue is clearly something in the Writing of the data since the reading...
Thanks, I have edited the post to add the code tokens.
regarding the comment on the buffer index, something must have gone wrong in the copy / paste as these indexes are in the code. I have corrected the code above.
Still struggling with this and getting even more confusing as I get further into it.
My code is as follows..(Apologies, can't see how to ad the code tags)
The Setup section
void setup()
{
//5 second startup delay
Serial.print(".")...
Apologies, yes, I do have the connections from the teensy to chip 1 for MISO, MOSI and CLK.
with just a single chip connected, I can communicate with the SRAM fine. It is only when I link the SCK pin from the first chip to the second chip that...
Hello,
I am working on a project where I need to connect a Teensy 4.1 to 4 off 23LCV1024 SRAM chips using SPI.
I have the teensy eventually talking to a single chip. I had to put some delayNanosecond calls into the code to get the timing correct...
I believe I’ve just worked out what is happening. When compiling, the compiler is using 32 byte boundary for RAM2 Reporting. This is why if I use byte for the variable type it still allocates the capacity correctly, but because there is some...
I am changing the single line in the code…
DMAMEM byteKBIndex[50000];
then compiling and viewing the Compile stats where it shows the usage for RAM1 and RAM2.
Thanks, that works.
on a similar theme, if I use byte, char, and uint8_t, I get a usage of 49984 not the expected 50000 hence 16 bytes short. Any ideas why this would be the case?
I am working on a Knowledge base project and would like to store an index in DMAMEM which links to a record number on an SD card.
I have used the following in my code
DMAMEM word KBIndex[50000];
When I compile this, this single line uses 200000...