Interface SRAM 23k256 to Arduino Duemilanove

After some frustrating tests in interfacing the Microchip SRAM 23K256 with Arduino duemilanove, the results are without success.
I'm quite confused about this simple hardware and software interfacing, as reported in the Datasheet and in Application notes.
From the Hardware point of view, I used the next wiring:

  • an in-line resistor of 1K on pin CS (SLAVESELECT) plus a 10K pull-up resistor to 3,3 volt;
  • an in-line resistor of 10K on pin MOSI (DATAIN);
  • an in-line resistor of 10K on pin SCLK (SERIALCLOCK);
  • direct connection to pin MISO (DATAOUT);
  • a power of 3,3 volts coming directly from the proper pin on Arduino, connected to pin Vdd of 23K256 chip;
  • SPI mode 1 (CPOL=0 and CPHA=1).
    I also tried to simplify the code, just limiting it to only two simple steps:
  1. configuring the Write Status Register of the SRAM;
  2. reading the above configuration.
    In the next code I post, I first send the command Write Status Register (0x01), then send the configuration Sequential mode and Hold pin disabled (0x41).
    In second place, I send the Read Status Register Command (0x05) and finally send a dummy byte (0xFF) to obtain a byte from the MISO pin.
    Unfortunately I do not obtain the value 0x41 (65 in decimal format), as I should expect !
    I just obtain -1 or 0.
    The solution of the above two steps is crucial for the next phase of storing true data coming from an high resolution ADC.
    Is there anybody interested with this challenge?

#define DATAOUT 11//MOSI
#define DATAIN 12//MISO
#define SPICLOCK 13//sck
#define SLAVESELECT 10//ss

byte clr;
char value;

char spi_transfer(volatile char data)
{
SPDR = data; // Start the transmission
while (!(SPSR & (1<<SPIF))) // Wait for the end of the transmission
{
//Serial.print('.');
};
return SPDR; // return the received byte
}

void setup()
{
Serial.begin(9600);
pinMode(DATAOUT, OUTPUT);
pinMode(DATAIN, INPUT);
pinMode(SPICLOCK,OUTPUT);
pinMode(SLAVESELECT,OUTPUT);
digitalWrite(SLAVESELECT,HIGH); //disable device
delay(10);
SPCR= (1<<SPE)|(1<<MSTR)|(0<<CPOL)|(1<<CPHA); //SPI mode 1
clr=SPSR;
clr=SPDR;
delay(10);
}

void loop()
{
digitalWrite(SLAVESELECT,LOW);
spi_transfer(0x01); Serial.println("send 0x01 Write Status Register Command ");
delay(100);
spi_transfer(0x41); Serial.println("send 0x41 Select Sequential mode, Hold disabled");
digitalWrite(SLAVESELECT,HIGH);
delay(100);

digitalWrite(SLAVESELECT,LOW);
spi_transfer(0x05); Serial.println("send 0x05 Read Status Register Command ");
delay(100);
value=spi_transfer(0xFF);
digitalWrite(SLAVESELECT,HIGH);
Serial.print("Data from Status Register -> "); //should obtain 0x41 or 65 in dec mode
Serial.println(value,DEC);
Serial.println();
delay(3000);
}