Mega NVRam Programmer

Here is is my attempt to use the Arduino Mega 2560 board to be able to program NVRam memory chips like Dallas DS1249Y,DS1250Y and DS1270Y.

Basic parts needed..

Plus few extra parts like wire wrap wire  .. few extra rows of pins (around the ZIF socket and side of the shield board). The choice of 40 pin ZIF socket is because that I have not seen many 36pin ZIF sockets .. plus this way having a 40 pin socket make it easier to use any larger memory chips.

You should be able to source most of these parts via Ebay. The good thing about wire wrap version is that you can easily adapt this design to any memory chip including EEPROMS .. like 28' series. If you do not like wire wrapping .. that is OK just use small solder links of hookup wire and it will do the job much the same.

Constructing the programmer

I will try to show in as much detail as possible to replicate the construction. Insert  the shield pins in Mega board and then position the shield board over the pins for soldering. Bit fiddly but should be easy to master.

Solder all the pins.  Also solder the reset switch if available on your shield board.

Next, insert the ZIF socket approximately in middle of the board and  insert extra lengths of pins along the labeled rows on the shield (that will be used for wire wrapping to the ZIF socket) and two rows of 20 pins along the ZIF socket. If you are just using hookup wire (soldering) then you do not need to do this step ... just solder directly between ZIF socket connections and the extended mega board connections on the shield.

Solder all the side pins and solder the 2x20 pins along the ZIF socket .. bridging the link between the ZIF socket and the pins that are alongside .. see pic below. ZIF sockets can sometimes be rather hard to solder due to material used for the ZIF socket ... So slight scratching of each the pins with a file or sharp side cutters will make better solder joints.

Here is top view with all pins in place ..+ led with resistor to indicate +5v supply power ... and 2 pull up resistors (2.2K)... that can be used as pull-ups on CS and WE pins .. to keep them high when not in use ... to stop any corruption of the RAM space .. Note 3 sets of pins on top RHS are the exra GND pins and 3 on the LHS are the +5v rail.

Following is the bottom view showing solder bridges between the IC socket and side pins and connections to the +5v and GND pins.

NVRam socket connections

To make connections from the ZIF socket to Mega I/O pins .. first we need the pin-out of the DS1250 .. or DS1270Y .... that I will use as an example..

 DS1270

 

DS1250

 

Looking at the pin-out of NVRam chips ... you can see all the pins occupy the same positions (from GND .. bottom LHS position of the ZIF socket) ... the only pins that differ are:

ZIF socket connections and the MEGA pins

Since everything will be wire wrapped, following is a good guide to follow in wire wrapping and connection to MEGA pins.

There is no particular choice of Mpins other then being a sequence of Mpins for ease of use. All pins should be digital I/O .. although only pins 5-12 need to be bidirectional (provide both input and output).

Completed wire wrapped board

Testing out NVRam connection to MEGA

Although the wire wrapping is complete ... we still need to check that all the connections on the ZIF socket correspond to appropriate Mpins ... and ALL PINS properly connected . You can use a logic probe or a LED and a resistor .. or a voltmeter to check output on ZIF socket pins. Below is the cross table between ZIF pins and MEGA I/O pins.

 Power/Control

 Data lines

 Address lines

So now to check the wiring ... lets write  Arduino code (on MEGA board) that lets us type a pin number via Arduino terminal program and the corresponding pin go in high state or +5v output. You can check that with a probe and keep going through all the pins 2-4,5-7 and 22-40  ... that they change state from low to high and correspond to cross table above. Just copy and paste the code below to test it on your own board. NOTE: If your Arduino board has slightly different pin-out(s) then make up your own cross table and adjust the code below to suit that table.

Pin Test Code

/* Program to test out output on all the pins used for the NVRam chip:

   User to input a pin number (as a string) via com port

   Print out the pin number and set that digital pin HIGH

   Only set pins HIGH in the pin set for the NVRam chip

   (i.e. pins 2-12 or 22-40).

*/

//Declare variables used

String a;   //input number as string from com port

int numa;   //number value from string

int pnuma;  //previous value of number selected

// an array of pin numbers for all lines on MEGA that attach to the ZIF socket -

// NVRam control, data and address lines

int allPins[] =

{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40};

int pinCount = 30; // the number of pins (i.e. the length of the array)

void setup()

{

  // Turn the Serial Protocol ON

  Serial.begin(9600);

 

  // The array elements are numbered from 0 to (pinCount - 1).

  // Use a FOR loop to initialize each pin as an output:

  for (int thisPin = 0; thisPin < pinCount; thisPin++) {

    pinMode(allPins[thisPin], OUTPUT);

    //set all pins to LOW

    digitalWrite (allPins[thisPin], LOW);

  }

 

  //Set default value of previos selected pin to 2

  pnuma = 2;

}

void loop()

{

  /*  check if data has been sent from the computer: */

  if (Serial.available())

  {

    a = Serial.readString(); // read the incoming data as string

    numa = a.toInt();   //convert string number to integer number type

    // test if pin value in the range.If OK set that pin to HIGH

    if ((numa >= 2 and numa <= 12) or (numa >= 22 and numa <= 40))

    {

      //set previous pin to LOW so only one pin is HIGH

      digitalWrite(pnuma, LOW);

     

      //set selected pin HIGH

      digitalWrite(numa, HIGH);

     

      Serial.print("Pin ");  //echo back to terminal

      Serial.print(numa);

      Serial.println(" is now HIGH.");

     

      //prevous pin value becomes current

      pnuma = numa;

     }  

      else 

     {

     // Invalid Number message

     Serial.print("Invalid Pin# = ");

     Serial.print(numa);

     Serial.println(" - out of range");

     Serial.println("Valid range : 2-12 and 22-40");

     }

  }

}

 

 

Easiest way is to position a print out of NVRam pins along the side of the ZIF socket and then go though each of the pins starting from the bottom pins ... E.g. on RHS start with GND, DQ2 (pin 7), DQ1(pin 6) and so on .. so that pins 7, 6 ... so on .. till all pins  check out. If all OK ... you can go on the next exciting part like being able to read contents of the NVRam chip.