Reading and Writing eeprom 95320

Hi guys,

I have a problem with this eeprom, my arduino serial show always 0 when I read.

I want writing or reading this eeprom.

Can you help


my code :

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

#define WREN  6
#define WRDI  4
#define RDSR  5
#define WRSR  1
#define READ  3
#define WRITE 2

byte eeprom_output_data;
byte eeprom_input_data=0;
byte clr;
int address=0;
//data buffer
char buffer [32];

void setup()

  pinMode(DATAIN, INPUT);
  digitalWrite(SLAVESELECT,HIGH); //disable device

  //SPCR = (1<<SPE)|(1<<MSTR);
  SPCR = (1<<SPE)|(1<<MSTR)|(0<<CPHA)|(1<<SPR1)|(1<<SPR0)(0<<DORD);


 //fill buffer with data
  //fill eeprom w/ buffer
  spi_transfer(WREN); //write enable

  spi_transfer(WRITE); //write instruction
  spi_transfer((char)(address>>8));   //send MSByte address first
  spi_transfer((char)(address));      //send LSByte address
  //write 128 bytes
  for (int I=0;I<32;I++)
    spi_transfer(buffer[I]); //write data byte
  digitalWrite(SLAVESELECT,HIGH); //release chip
  //wait for eeprom to finish writing


void loop()
  eeprom_output_data = read_eeprom(address);
  delay(500); //pause for readability

void fill_buffer()
  for (int I=0;I<32;I++)

char spi_transfer(volatile char data)
  SPDR = data;                    // Start the transmission
  while (!(SPSR & (1<<SPIF)))     // Wait the end of the transmission
  return SPDR;                    // return the received byte

byte read_eeprom(int EEPROM_address)
  int data;
  spi_transfer(READ); //transmit read opcode
  spi_transfer((char)(EEPROM_address>>8));   //send MSByte address first
  spi_transfer((char)(EEPROM_address));      //send LSByte address
  data = spi_transfer(0xFF); //get data byte
  digitalWrite(SLAVESELECT,HIGH); //release chip, signal end transfer
  return data;