 enum State state = REST;
 int blink_timer  = 0;
 ushort addr      = 0x0000;
-byte data        = 0xFF;
 bool wait        = true;
 byte page_buffer[64];
 byte ascii_buffer[128];

   pinMode(CHIP_PIN,   OUTPUT);
   pinMode(WRITE_LED,  OUTPUT);
   pinMode(READ_LED,   OUTPUT);
   digitalWrite(READ_PIN,   HIGH);
   digitalWrite(CHIP_PIN,   HIGH);
   digitalWrite(WRITE_PIN,  HIGH);

   Serial.begin(9600);
}

               fillBinBuffer(ascii_buffer, page_buffer, ascii_bytes);
               int bytes_to_write = ascii_bytes / 2;
               digitalWrite(WRITE_LED, HIGH);
               setWriteMode();
               for (int i = 0; i < bytes_to_write; ++i) {
                  writeToAddr(addr, page_buffer[i]);
                  addr++;
               }
