Arduino Microwire EEPROM Reader

Hardware Tools & Development
Post Reply
PVTech
Site Admin
Posts: 48
Joined: Wed Feb 13, 2013 7:35 pm

Arduino Microwire EEPROM Reader

Post by PVTech »

Sometimes when we are dealing with ECU stuff and not only we come across a microwire eeprom.
Those EERPOMs are 93Cx6 series EEPROMs. Mainly they hold data like immobiliser code, VIN, odometer and generally data used by the main program routine.
So how do we read the data if we dont have a microwire EEPROM programmer?
There is no problem if you have an Arduino. I did some searching and i came across some code that can read the data from a 93C56 EEPROM.
The connections are easy and you can read the data without desoldering them from the ECU or the dashboard.

Here is the code to read the 93C56 eeprom (L56R). There are comments if you want to read it in 8bit or 16bit organization.

Code: Select all

//defining pins for eeprom   
int DATA_IN = 2;    // EEPROM PIN#4
int DATA_OUT =3;    // EEPROM PIN#3
int CLOCK =4;       // EEPROM PIN#2
int CHIP_SEL =5;    // EEPROM PIN#1

int high = 0,low =0;     //high and low address 
byte dataword[]={"hello world!"};    //data to send in eeprom

byte READ  = 0b1100;          //read instruction 
byte WRITE = 0b1010;          //write instruction
byte EWEN  = 0b10011;         //erase write enable instruction

void setup(){
  pinMode(CLOCK ,OUTPUT);
  pinMode(DATA_OUT ,OUTPUT);
  pinMode(DATA_IN ,INPUT);
  pinMode(CHIP_SEL ,OUTPUT);
  digitalWrite(CHIP_SEL ,LOW);
  Serial.begin(9600); 
}

void loop()
{
  char buf[8];

  //digitalWrite(CHIP_SEL ,HIGH);                  
  //shiftOut(DATA_OUT,CLOCK,MSBFIRST,EWEN);     //sending EWEN instruction
  //digitalWrite(CHIP_SEL ,LOW);
  delay(10);
  
  low=0;
  
  // For 8bit organization change it to i<=255
  for (int i=0; i<=127; i++)
  { 
    digitalWrite(CHIP_SEL ,HIGH);
    shiftOut(DATA_OUT,CLOCK,MSBFIRST,READ); //sending READ instruction 
    shiftOut(DATA_OUT,CLOCK,MSBFIRST,low);   //sending low address
    byte a = shiftIn(DATA_IN,CLOCK,MSBFIRST); //sendind data
    
    // The Following Line is for x16Bit Organization
    // Comment it for 8 bit organization
    byte b = shiftIn(DATA_IN,CLOCK,MSBFIRST); //sendind data
    
    digitalWrite(CHIP_SEL ,LOW);
    
    // For 8bit Organization change it to low++;
    low+=2;       //incrementing low address
    
    // The Following Line is for x16bit Organization
    sprintf(buf, "%02X%02X", a,b);
    
    // The Following Line is for x8bit Organization
    //sprintf(buf, "%02X", a);
    
    Serial.print(buf);
  } 
  while(1);
}
Post Reply