23K256 is not working with the SpiRam3 Library

Hi All,

first of all sorry for my english I'm from Germany and second I'm a newby in Arduino.

I have a Problem with the 23K256.
Im using a Arduino Leonardo with a Wireless SD Shield. I know that the SCK, Miso and Mosi are now on Pins 13,12,11.
I also use a Logic level converter.
When I use the Example code the serial monitor show me "ram error...".
Is my circuit wrong or is the Library not compatible?

Its a important project, so please help me.

With best regards

It is normally considered polite to give the other users your name or tag or something. So for convenience, let's call you Mr. Nobody.

Hi there, Mr Nobody. Welcome to the Forum.

If I read your 'schematic' correctly, you have all the control and data lines being level shifted from Hi to Lo. Problem is MISO goes from Slave to Master, not Master to Slave like the others.

Just connect SO on the 23K256 directly to MISO, or level shift from Lo to Hi.

As an aside, I, and most others on the forum, hate fritzing, but that is beside the point.

Fof

Hi Fof,

thank you for your reply. I dont know why you can't see my Tag. My Tag is Feroduino.

Ok I will try it. The LLC is a bidirectional Converter.

With best regards
Fero

Hi Fero

What level shifter are you using?

Fof

Hi all,

I try it and it doesn't work with the shield and without the shield.

I do something wrong. :confused:

best regards
Fero

IamFof:
Hi Fero

What level shifter are you using?

Fof

Hi Fof,

Sry I doesnt see your post earlier. I use this one: https://www.sparkfun.com/products/12009

best regards
Fero

Fero

The next thing you ought to do is post your code (use the code tags, PLEASE!!) so that the code gurus can come aboard.
I presume you have the the SD_CS set as Output and that it drives LOW when you access the chip?

Fof

Hi,

I use the example code from Arduino site. I set the SS_Pin to 4. I try it with other Pins as well.
I have a 10 k Pullup Resistor at CS on 23K256.

I have a Question:

  1. When I use the Wireless sd Shield on Leonardo, are the ICSP on 13,12 and 11?
#include <SPI.h>
#include <SpiRAM.h>

#define SS_PIN 4

byte clock = 0;
SpiRAM SpiRam(0, SS_PIN);

void setup()   {                
  Serial.begin(9600);
}

void loop()                    
{
  char data_to_chip[17] = "Testing 90123456";
  char data_from_chip[17] = "                ";
  int i = 0;

  // Write some data to RAM
  SpiRam.write_stream(0, data_to_chip, 16);
  delay(100);

  // Read it back to a different buffer
  SpiRam.read_stream(0, data_from_chip, 16);

  // Write it to the serial port
  for (i = 0; i < 16; i++) {
    Serial.print(data_from_chip[i]);
  }
  Serial.print("\n");
  delay(1000);                  // wait for a second
}

I am definately no expert but you have SS set as pin 4, but you have the CS of the 23K256 connected to SD_CS on the schematic and pin 4 on the fritzing. Also, as I understand it, the SS pin has to be defined as an OUTPUT using pinMode.
As for the Leonardo and the Wireless shield, I have no experience of either.
If none of this helps, then I hope one of the gurus can give you more assistance.

Fof

Edit: Look at SD3234 & Micro SD Card Adapter not working together - Storage - Arduino Forum This may give you some clues (I hope)

Hi Fof,

I solved it.. Thank you so much for your replies..

Regards
Fero

So, to help others who may have the same or similar problem, what was the fix you used?

Fof