transfer of data

Hello,

I would like some help to pass values stored in a text file to a RAM card via a cable that I realized

int a[4];
int j=0;
int teste;
int info[14];
int z=0;
//pin d adresse
int L[13]={25,27,29,31,33,35,37,39,41,43,45,47,49};
int W[13]={7,6,5,4,3,2,14,15,16,17,18,19,20};
int wt=12;
int rmemd=9;
int rr=11;
int cp32=10;
int adresse=0;
int A[13];
int pret=9;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
for(int i=0;i<13;i++)
{
pinMode(W[i],OUTPUT);
digitalWrite(W[i],LOW);
}
pinMode(wt,OUTPUT);
pinMode(rmemd,OUTPUT);
pinMode(cp32,OUTPUT);
pinMode(rr,OUTPUT);
digitalWrite(wt,LOW);
digitalWrite(rmemd,LOW);
digitalWrite(cp32,LOW);
digitalWrite(rr,HIGH);

while(teste!=1) //CODAGE ET SUPPRESSION DES PARASITES
{
if(Serial.available() > 0)
{
a[z]=Serial.read();
z++;
if(z==4)
{
if(a[0]==57 && a[1]==56 && a[2]==55 && a[3]==54)
{
teste=1;
}
z=0;
}
}
}
delay(1000);
}

void loop() {
  // put your main code here, to run repeatedly:
if(Serial.available() > 0)
{
if(teste == 1)
{
info[j]=Serial.read();//LECTURE DE DONNEES
if(info[j]==50)
{
j=0;
}

if(info[j]==49)
{
info[j]=1;
}

if(info[j]==48)
{
info[j]=0;
}

if(j==13)
{
digitalWrite(cp32,HIGH);
digitalWrite(rr,LOW);
digitalWrite(wt,LOW);
digitalWrite(rmemd,HIGH);

for(int i=0;i<13;i++) //@ d emission
{
A[i]=bitRead(adresse,i);
digitalWrite(L[12-i],A[i]);
}
for(int c=1;c<14;c++) 
{
digitalWrite(W[c-1],info[c]);

}

digitalWrite(cp32,LOW);
digitalWrite(rr,HIGH);
digitalWrite(wt,HIGH);
digitalWrite(rmemd,LOW);

Serial.print(pret);
j=0;
adresse++;
}
j++;
}
}
}

and the transfer operation is not performed
thank you for help

Please auto format your sketch and add comments.

Before posting code, it's a good idea to use the auto-format tool in the IDE to make it more legible.

What's the problem? Where's the schematic?

          A[i]=bitRead(adresse,i);
          digitalWrite(L[12-i],A[i]);

Why not get rid of A[] completely, and re-order L[], so then this becomes simply

digitalWrite (L[i], bitRead(adresse,i));


the project is the realization of a program loader I have the code loaded as a .txt file and I used processing that can transfer the frimware and the program through the USB cable.

int a[4];
int j=0;
int teste;
int info[14];
int z=0;
//pin d adresse
int L[13]={25,27,29,31,33,35,37,39,41,43,45,47,49};
// pin configurer en sortie
int W[13]={7,6,5,4,3,2,14,15,16,17,18,19,20};
//pin d ecriture
int wt=12;
// readmemory
int rmemd=9;
//read restore
int rr=11;
//clocke pulse
int cp32=10;
int adresse=0;
int A[13];
int pret=9;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
for(int i=0;i<13;i++)
{
pinMode(W[i],OUTPUT);
digitalWrite(W[i],LOW);
}
pinMode(wt,OUTPUT);
pinMode(rmemd,OUTPUT);
pinMode(cp32,OUTPUT);
pinMode(rr,OUTPUT);
digitalWrite(wt,LOW);
digitalWrite(rmemd,LOW);
digitalWrite(cp32,LOW);
digitalWrite(rr,HIGH);

while(teste!=1) //CODAGE ET SUPPRESSION DES PARASITES
{
if(Serial.available() > 0)
{
a[z]=Serial.read();
z++;
if(z==4)
{
// verification de void keyPressed() deja definit dans le code processing pour la securité
if(a[0]==57 && a[1]==56 && a[2]==55 && a[3]==54)
{
teste=1;
}
z=0;
}
}
}
delay(1000);
}

void loop() {
  // put your main code here, to run repeatedly:
if(Serial.available() > 0)
{
if(teste == 1)
{
info[j]=Serial.read();//LECTURE DE DONNEES

if(info[j]==50)
{
j=0;//adaptation au niveau LOW des pins
}

if(info[j]==49)
{
info[j]=1;//adaptation au niveau HIGH des pins
}

if(info[j]==48)
{
info[j]=0;
}

if(j==13)
{
digitalWrite(cp32,HIGH);
digitalWrite(rr,LOW);
digitalWrite(wt,LOW);
digitalWrite(rmemd,HIGH);

for(int i=0;i<13;i++) //adresse  d emission
{
A[i]=bitRead(adresse,i);
digitalWrite(L[12-i],A[i]);
}
for(int c=1;c<14;c++) 
{
digitalWrite(W[c-1],info[c]);

}

digitalWrite(cp32,LOW);
digitalWrite(rr,HIGH);
digitalWrite(wt,HIGH);
digitalWrite(rmemd,LOW);

Serial.print(pret);
j=0;
adresse++;
}
j++;
}
}
}