Author Topic: Intel 8748 uC programming with Arduino  (Read 6458 times)

0 Members and 1 Guest are viewing this topic.

Offline TimInCanadaTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: ca
Intel 8748 uC programming with Arduino
« on: September 25, 2017, 04:43:07 pm »
In case this is of use to anyone else.  Programming a 8748 is most likely done to repair something, which is why this is being posted in Repair.

I needed to program a 8748 to replace a dead 8048 (mask programmed version), but the 8748 uses programming voltages that are not available with inexpensive EPROM programmers.  So, Arudino to the rescue.

Attached is the program.  See the datasheet for wiring of the 8748.  Note that this program and voltages listed are for the 8748H version of the chip.  Voltages are different for the regular version, but double check the programming sequence is the same, too.

The data to be written to the uC is in a byte array of hexadecimal values.  By using the PROGMEM key word, this array is stored in the Arduino's flash memory so that a 2Kbyte 8749 can be programmed as well.

There is also a schematic for the transistor switches I used.  There are probably better circuits, but these worked.  The EA signal switches between 5 and 18 volts, the VDD between 5 and 21 and the PROG between floating and 18.  I used three bench supplies and adjusted the input voltages so the outputs were 5, 18 and 21 after the transistor and diode voltage drops.  The 1K resistors to ground are to ensure there is enough current flow that the diodes are fully on.

The program follows the datasheet instructions exactly and verifies each byte after it is written.  The program ends with a message programming either worked or it didn't.

Tim
« Last Edit: September 25, 2017, 04:51:14 pm by TimInCanada »
 
The following users thanked this post: saturnin, diyman11

Offline saturnin

  • Regular Contributor
  • *
  • Posts: 116
  • Country: cz
Re: Intel 8748 uC programming with Arduino
« Reply #1 on: September 25, 2017, 05:44:12 pm »
I needed to program a 8748 to replace a dead 8048 (mask programmed version), but the 8748 uses programming voltages that are not available with inexpensive EPROM programmers.  So, Arudino to the rescue.

FYI. I successfully used Willem EPROM Programmer to program i8748 some time ago (all documentation needed to build one is here: http://www.mpu51.com/eprom/eprom.html). It worked perfectly, though I had to use an adapter, because Willem Programmer does not have appropriate socket for 8748. I admit it is rather old programmer and its usage is little bit cumbersome nowadays since it requires LPT port...
 

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Intel 8748 uC programming with Arduino
« Reply #2 on: September 25, 2017, 07:15:05 pm »
I did build such a programmer with a Arduino Nano to repair my PM6654C counter.

It is relatively easy to build on vero-board: https://www.eevblog.com/forum/microcontrollers/simple-programmer-for-vintage-intel-mcs-48-microcontroller/msg975681/#msg975681

Edit: And by looking at the program, I see you found it already  ;D

When I wrote my Arduino-Sketch for this, I didn't know about the PROGMEM-Option, so I wasn't able to program anything bigger than 1k.

Offline TimInCanadaTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: ca
Re: Intel 8748 uC programming with Arduino
« Reply #3 on: September 26, 2017, 06:39:01 pm »
Hi SaabFAN,

Yes, thank you for posting your solution.  I had started with your code and the MCS-48 handbook, and by the time I had figured it out and got it working, there wasn't much original code left.  Primarily because of my (often slow) learning curve.  :)

Tim
 

Offline DreaDNoughT1666

  • Newbie
  • Posts: 1
  • Country: se
Re: Intel 8748 uC programming with Arduino
« Reply #4 on: February 12, 2020, 07:03:50 pm »
Hi TimInCanada,
I needed to get a philips g7400 back up and running and I came across your project that I built (and burned up one 8748H because i flipped the PNP transistors the wrong way around whoops)
And i just wanted to ask if you are sure that the d8748 has different programming power than the D8748H, because from (the little ammount) of information that I can gather, they're both the same ?
it's just that the D8748H version seem to be Cmos (or Hmos) and the D8748 seems to be NMOS.
 

Offline fg

  • Newbie
  • Posts: 1
  • Country: fr
Re: Intel 8748 uC programming with Arduino
« Reply #5 on: December 13, 2021, 01:41:14 pm »
hello, thx for your share, I tried to flash a chip with this process I have the message "EPROM programmed successfully" but the chip remains empty when I test it. Do you have any idea what's going on? thank you for your reply
my chip is a D8748HD that may be the problem? Otherwise I modify the order of the pins to adapt it to a pcb but I have checked several times and the code corresponds well to the outputs, SO?

Code: [Select]
/*
  Sketch for programming EPROM in Intel D8748H microcontroller using an Arduino Uno

  Note the D8748H uses different programming voltages than the 8748.

  Inspired by a solution by SaabFAN on EEVblog forum for the 8742 and Ardunio Nano:
  [url]https://www.eevblog.com/forum/microcontrollers/simple-programmer-for-vintage-intel-mcs-48-microcontroller/[/url]

  Reference: Intel D8748H datasheet [url]http://www.alldatasheet.com/datasheet-pdf/pdf/80208/INTEL/D8748H.html[/url]

  Programming the D8748H version requires:
    VCC = 5 +/- 0.25    total supply current @ VCC = 100 mA max
    VDD_H = 21 +/- 1.0 @ 20 mA max
    VDD_L = VCC @ 15 mA max
    PROG_H = 18 +/- 0.5 @ 1 mA max
    PROG_L = float or 4.0 to VCC @ 1 mA max
    EA_H = 18 +/- 0.5 @ 1 mA max
    EA_L = VCC
    also, P10 & P11 must be tied to ground.

  In addition to these signals, the 8748 needs a crystal on pins 2&3, 5V on pin 40 and 0V on pin 20.
  The datasheet says there must be a floating state on PROG.

  Each byte is programmed then read back immediately for verification.  If there is not a match,
  programming stops with an error message.  To test the hardware is working, the "break" statement
  in Step 12 can be commented out and the Arduino will go through the full programming cycle
  without stopping.

  This code is in the public domain.  Use at your own risk, and have fun!
*/

// Put your EPROM program in this array hexProg[].  Use 8bit HEX-Values separated by a ",".
// Set progSize to number of bytes in program.
// The example program data here is for the POLYSIX 8048 cpu board.

#include <avr/pgmspace.h>

const int progSize = 1024;
const byte hexProg[progSize] PROGMEM  = {
        0x99, 0x1F, 0x27, 0x54, 0xD6, 0x54, 0xDC, 0xD7, 0x09, 0x92, 0x0D, 0x64,
0xB9, 0xD5, 0xB9, 0x14, 0x23, 0x01, 0xA1, 0x19, 0xA1, 0x19, 0x27, 0xA1,
0x19, 0xA1, 0xBB, 0x40, 0xAE, 0x85, 0x24, 0xC8, 0x23, 0x0D, 0xAF, 0x17,
0xAD, 0xBE, 0x00, 0x54, 0x1A, 0x23, 0xFD, 0x62, 0x55, 0xFF, 0x3A, 0x03,
0x20, 0xA8, 0xF0, 0x02, 0x89, 0x40, 0x23, 0x20, 0x6E, 0xA8, 0xB9, 0x10,
0x23, 0xF8, 0x6E, 0xF6, 0x44, 0xFE, 0x04, 0x45, 0x19, 0x03, 0xEF, 0xE3,
0xAB, 0xF9, 0xD5, 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0xBA, 0x00, 0x76, 0x7F, 0x56, 0x87, 0xEA,
0x79, 0x44, 0x83, 0x46, 0x87, 0xEA, 0x7F, 0xBD, 0x01, 0xBE, 0x01, 0xB5,
0x16, 0x8B, 0xA7, 0x23, 0xFA, 0x62, 0x54, 0xE2, 0x83, 0xAB, 0x97, 0x54,
0xA5, 0xBF, 0x08, 0xFB, 0x67, 0xAB, 0x54, 0xA5, 0xEF, 0x97, 0x97, 0xA7,
0x54, 0xA5, 0x54, 0xA5, 0x83, 0x54, 0xF0, 0x0A, 0x52, 0xAE, 0x43, 0x0C,
0x44, 0xB0, 0x53, 0x03, 0xAA, 0x23, 0xFC, 0xF6, 0xBA, 0xF7, 0x2A, 0xD3,
0x08, 0x2A, 0x16, 0xBE, 0x44, 0xBA, 0x62, 0xFA, 0x3A, 0x83, 0x54, 0x65,
0xD3, 0x50, 0x96, 0xC2, 0x54, 0x65, 0xD3, 0x36, 0x96, 0xC2, 0x83, 0xB8,
0x00, 0xBD, 0x02, 0x9A, 0xFD, 0x83, 0x02, 0x8A, 0x40, 0x9A, 0xBF, 0x83,
0x02, 0x8A, 0x80, 0x9A, 0x7F, 0x83, 0xB6, 0xE6, 0x44, 0xF0, 0x23, 0x7F,
0x02, 0x09, 0x52, 0xEE, 0x44, 0xF0, 0x64, 0x1E, 0x86, 0xF4, 0x04, 0x00,
0x23, 0xBF, 0x02, 0x09, 0x72, 0xFC, 0x64, 0x1E, 0x83, 0x54, 0xDC, 0x27,
0xAC, 0x54, 0xD6, 0x55, 0x83, 0x23, 0xC0, 0x49, 0x37, 0x96, 0x12, 0xFC,
0x97, 0xA7, 0xF7, 0xAC, 0x54, 0xD6, 0x83, 0x97, 0xA7, 0xBF, 0x00, 0x54,
0xA5, 0xEF, 0x17, 0xEE, 0x17, 0x83, 0x27, 0x54, 0xD6, 0x54, 0xDC, 0xD7,
0x85, 0x65, 0x54, 0xF0, 0x37, 0x12, 0x31, 0x52, 0x8C, 0x32, 0x61, 0x64,
0x24, 0x23, 0x01, 0x54, 0xFD, 0xBE, 0x28, 0x74, 0x13, 0x23, 0x50, 0x54,
0x91, 0x23, 0x36, 0x54, 0x91, 0x54, 0xCF, 0x64, 0x47, 0x8A, 0x02, 0xBE,
0x00, 0xB9, 0x00, 0x54, 0x45, 0x28, 0x68, 0x28, 0x54, 0x91, 0x74, 0x05,
0xEE, 0x4B, 0xED, 0x45, 0xF8, 0x54, 0x91, 0xBE, 0x06, 0x74, 0x13, 0x64,
0x1E, 0x95, 0x54, 0xE2, 0x23, 0x02, 0x54, 0xFD, 0x54, 0xC2, 0x23, 0x32,
0x54, 0xDC, 0x54, 0xCF, 0x64, 0x74, 0x8A, 0x02, 0xBE, 0x00, 0xB9, 0x00,
0x54, 0x65, 0x28, 0x68, 0x28, 0x54, 0x58, 0x74, 0x05, 0xEE, 0x78, 0xED,
0x72, 0x54, 0x65, 0xD8, 0x96, 0xB3, 0x64, 0x1E, 0x23, 0x04, 0x54, 0xFD,
0x54, 0xC2, 0x23, 0x14, 0x54, 0xDC, 0x54, 0xCF, 0x64, 0x9C, 0x8A, 0x02,
0xBE, 0x00, 0xB9, 0x00, 0x54, 0x65, 0x28, 0x68, 0x28, 0xAB, 0x54, 0x45,
0xDB, 0x96, 0xB3, 0x74, 0x05, 0xEE, 0xA0, 0xED, 0x9A, 0x64, 0x85, 0x23,
0x08, 0x54, 0xDC, 0x64, 0x24, 0xB8, 0x0C, 0xB9, 0x0C, 0xBE, 0x00, 0x54,
0x1A, 0x74, 0xD9, 0x19, 0x1E, 0x54, 0x1A, 0x37, 0x74, 0xD9, 0xBA, 0x04,
0x21, 0xF7, 0x21, 0x20, 0x67, 0x20, 0xEA, 0xCC, 0xF0, 0x54, 0xD6, 0x64,
0xBB, 0x96, 0xDE, 0xB1, 0x10, 0x83, 0x03, 0xFE, 0xF6, 0xE5, 0xB1, 0x20,
0x83, 0x03, 0xFE, 0xF6, 0xEC, 0xB1, 0x40, 0x83, 0xB1, 0x80, 0x83, 0x01,
0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x04, 0x03, 0x03, 0x0C, 0x30,
0xC0, 0x01, 0x0E, 0xF0
};

// Pin assignments from Uno to the 8748
int DB0 = 4;      //DB0-DB7 are 8748 pins 12-19
int DB1 = 5;
int DB2 = 6;
int DB3 = 7;
int DB4 = 8;
int DB5 = 9;
int DB6 = 10;
int DB7 = 11;
int P20 = A0;     //P20, P21 are 8748 pins 21, 22
int P21 = A1;
// int P23 = A2;
int TEST0 = 2;   // 8748 pin 1 //2
int RESET = 3;   // 8748 pin 4 //3
int EA_H = A3;    // transistor switch for EA high  (8748 pin 7)
int VDD_H = A5;   // transistor switch for VDD high (8748 pin 26)
int PROG_H = A4;  // transistor switch for PROG high (8748 pin 25)

int incomingByte;
boolean programmedFlag = false;
boolean errorFlag = false;

//--------------------------------------------------------------------------------------
void setup() {
  Serial.begin(9600);     // Actions will be echoed to the monitor.  Make sure it is open.

  // Setup the Control-Pins
  pinMode(P20, OUTPUT);
  pinMode(P21, OUTPUT);
  pinMode(TEST0, OUTPUT);
  pinMode(RESET, OUTPUT);
  pinMode(EA_H, OUTPUT);
  pinMode(VDD_H, OUTPUT);
  pinMode(PROG_H, OUTPUT);
  //DB0-7 are bidirectional, so set their mode later.

  // Initial state from data sheet
  digitalWrite(TEST0, HIGH);    // 5V
  digitalWrite(RESET, LOW);     // 0V
  digitalWrite(EA_H, LOW);      // EA = 5V
  digitalWrite(VDD_H, LOW);     // VDD = 5V
  digitalWrite(PROG_H, LOW);    // PROG floating

  Serial.println("D8748H Programmer READY");
  Serial.println("Command: press p to program 8748 EPROM");
  Serial.println();
}
//--------------------------------------------------------------------------------------
void loop() {
  if (Serial.available() > 0) {

    incomingByte = Serial.read();

    if (incomingByte == 'p') {
      if (!programmedFlag) {  // prevent accidental attempt to reprogram chip
        Program_8748();
        programmedFlag = true;
      }
    }
  }

}

//--------------------------------------------------------------------------------------
void Program_8748() {
  // Steps are from datasheet programming instructions.  Steps 1 and 2 already done in setup().

  // Step 3: TEST0 = 0V (select program mode).
  digitalWrite(TEST0, LOW);
  delay(1);          // 8748 needs at least 4 clock cycles (~20 uS) to process each change

  // Step 4: EA = 18V (activate program mode),
  digitalWrite(EA_H, HIGH);
  delay(1);

  for (int address = 0; address < progSize; address++) {
    // Step 5 (repeats from here for all program bytes): Address applied to BUS and P20-1.
    pinMode(DB0, OUTPUT);
    pinMode(DB1, OUTPUT);
    pinMode(DB2, OUTPUT);
    pinMode(DB3, OUTPUT);
    pinMode(DB4, OUTPUT);
    pinMode(DB5, OUTPUT);
    pinMode(DB6, OUTPUT);
    pinMode(DB7, OUTPUT);

    digitalWrite(DB0, bitRead(address, 0));  // output the address
    digitalWrite(DB1, bitRead(address, 1));
    digitalWrite(DB2, bitRead(address, 2));
    digitalWrite(DB3, bitRead(address, 3));
    digitalWrite(DB4, bitRead(address, 4));
    digitalWrite(DB5, bitRead(address, 5));
    digitalWrite(DB6, bitRead(address, 6));
    digitalWrite(DB7, bitRead(address, 7));
    digitalWrite(P20, bitRead(address, 8));
    digitalWrite(P21, bitRead(address, 9));
    delay(1);

    // Step 6: RESET = 5V (latch address).
    digitalWrite(RESET, HIGH);
    delay(1);

    // Step 7: Data applied to BUS.
    digitalWrite(DB0, bitRead(hexProg[address], 0));
    digitalWrite(DB1, bitRead(hexProg[address], 1));
    digitalWrite(DB2, bitRead(hexProg[address], 2));
    digitalWrite(DB3, bitRead(hexProg[address], 3));
    digitalWrite(DB4, bitRead(hexProg[address], 4));
    digitalWrite(DB5, bitRead(hexProg[address], 5));
    digitalWrite(DB6, bitRead(hexProg[address], 6));
    digitalWrite(DB7, bitRead(hexProg[address], 7));
    delay(1);

    // Step 8: VDD = 21V (programming power).
    digitalWrite(VDD_H, HIGH);
    // datasheet says no delay needed here.

    // Step 9: PROG = float followed by one 50 to 60 ms pulse to 18V.
    digitalWrite(PROG_H, HIGH);
    delay(55);
    digitalWrite(PROG_H, LOW);
    // datasheet says no delay needed here.

    // Step 10: VDD = 5V.
    digitalWrite(VDD_H, LOW);
    delay(1);

    // Step 11: TEST0 = 5V (verify mode).
    digitalWrite(TEST0, HIGH);
    delay(1);

    // Step 12: Read and verify data on BUS.
    byte verifyByte = readByte(address);
    if (verifyByte != hexProg[address]) {
      errorFlag = true;
      Serial.print("ERROR ---> ");
      Serial.print("address = ");
      Serial.print(address, HEX);
      Serial.print(" program byte = ");
      Serial.print(hexProg[address], HEX);
      Serial.print(" verified byte = ");
      Serial.println(verifyByte, HEX);
      // break;    // jump out of loop
    }


    // Step 13: TEST0 = 0V.
    digitalWrite(TEST0, LOW);
    delay(1);

    // Step 14:  RESET = OV and repeat from step 5.
    digitalWrite(RESET, LOW);
    delay(1);

  }   // end loop

  // Step 15: Programmer should be at conditions of step 1 when 8748 is removed from socket.
  digitalWrite(TEST0, HIGH);    // 5V
  digitalWrite(RESET, LOW);     // 0V
  digitalWrite(EA_H, LOW);      // EA = 5V
  digitalWrite(VDD_H, LOW);     // VDD = 5V
  digitalWrite(PROG_H, LOW);

  if (errorFlag) {
    Serial.println("Exited with ERROR!");
  } else {
    Serial.println("EPROM programmed successfully.");
  }
}

//--------------------------------------------------------------------------------------
byte readByte(int address) {
  // Returns the EPROM byte at location "address".
  byte result;

  // make sure EA is high and PROG is floating (they should be anyway)
  digitalWrite(EA_H, HIGH);
  digitalWrite(PROG_H, LOW);
  delay(1);

  // put the address on the bus
  digitalWrite(DB0, bitRead(address, 0));
  digitalWrite(DB1, bitRead(address, 1));
  digitalWrite(DB2, bitRead(address, 2));
  digitalWrite(DB3, bitRead(address, 3));
  digitalWrite(DB4, bitRead(address, 4));
  digitalWrite(DB5, bitRead(address, 5));
  digitalWrite(DB6, bitRead(address, 6));
  digitalWrite(DB7, bitRead(address, 7));
  digitalWrite(P20, bitRead(address, 8));
  digitalWrite(P21, bitRead(address, 9));
  delay(1);

  // latch address in 8748
  digitalWrite(RESET, HIGH);
  delay(1);

  // switch pins to input mode
  pinMode(DB0, INPUT);
  pinMode(DB1, INPUT);
  pinMode(DB2, INPUT);
  pinMode(DB3, INPUT);
  pinMode(DB4, INPUT);
  pinMode(DB5, INPUT);
  pinMode(DB6, INPUT);
  pinMode(DB7, INPUT);

  // have 8748 put data on bus
  digitalWrite(TEST0, HIGH);
  delay(1);

  // read the data
  result =
    digitalRead(DB0) * 1 +
    digitalRead(DB1) * 2 +
    digitalRead(DB2) * 4 +
    digitalRead(DB3) * 8 +
    digitalRead(DB4) * 16 +
    digitalRead(DB5) * 32 +
    digitalRead(DB6) * 64 +
    digitalRead(DB7) * 128;

  // turn off read mode
  digitalWrite(RESET, LOW);
  digitalWrite(TEST0, LOW);
  delay(1);

  // put pins back into output mode
  pinMode(DB0, OUTPUT);
  pinMode(DB1, OUTPUT);
  pinMode(DB2, OUTPUT);
  pinMode(DB3, OUTPUT);
  pinMode(DB4, OUTPUT);
  pinMode(DB5, OUTPUT);
  pinMode(DB6, OUTPUT);
  pinMode(DB7, OUTPUT);

  return result;
}

« Last Edit: December 13, 2021, 01:46:23 pm by fg »
 

Offline yaros

  • Newbie
  • Posts: 3
  • Country: ca
Re: Intel 8748 uC programming with Arduino
« Reply #6 on: November 18, 2022, 11:02:25 pm »
Hi TimInCanada,
I needed to get a philips g7400 back up and running and I came across your project that I built (and burned up one 8748H because i flipped the PNP transistors the wrong way around whoops)
And i just wanted to ask if you are sure that the d8748 has different programming power than the D8748H, because from (the little ammount) of information that I can gather, they're both the same ?
it's just that the D8748H version seem to be Cmos (or Hmos) and the D8748 seems to be NMOS.

Sorry for necroposting, but I was having a hard time to find information myself, so I wanted to leave it here in case somebody else faces this issue. And I just finally found the documentation.

Reason why programming non H model does not work, is it has different programming voltages. Vdd, PROG and EA must be 25V instead of 18V and 21V (see image attached). My programmer doesn't have enough bodges I guess xD. I'll update the post later if I successfully program my non H versions.

*Edit:* Actually PROG must be 24.5 MAX, so that text is lying. Also timings are different.
« Last Edit: November 18, 2022, 11:57:46 pm by yaros »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: Intel 8748 uC programming with Arduino
« Reply #7 on: November 19, 2022, 08:34:42 am »
I think what you're looking at there is a preliminary datasheet, so the values are not necessarily the final ones. I have the sequence from the final (non-H and H) datasheets attached.
 
The following users thanked this post: edavid, yaros

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5884
  • Country: ca
Re: Intel 8748 uC programming with Arduino
« Reply #8 on: November 19, 2022, 01:42:38 pm »
i can do the 8748 and 8748H with my programmer  .... i would have helped you   since you're in canada ??
 

Offline yaros

  • Newbie
  • Posts: 3
  • Country: ca
Re: Intel 8748 uC programming with Arduino
« Reply #9 on: November 19, 2022, 08:58:02 pm »
I think what you're looking at there is a preliminary datasheet, so the values are not necessarily the final ones. I have the sequence from the final (non-H and H) datasheets attached.
Weird. (Edit: not weird. There is gigantic PRELIMINARY stamp across my own screenshot  |O. But my chips are indeed 2 years older than the document itself) I'm looking at MCS-48 Family of Single Chip Microcomputers Users' Manual from July 1978, two years younger than my chips. What's the name of your documents/where could I find those?

i can do the 8748 and 8748H with my programmer  .... i would have helped you   since you're in canada ??
Thanks! I have my own now, it did work with 25V supply, after I added 3 more bodge wires and glued perf board with few switches :-D

I can blink LED now.
« Last Edit: November 19, 2022, 09:04:43 pm by yaros »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
 

Offline yaros

  • Newbie
  • Posts: 3
  • Country: ca
Re: Intel 8748 uC programming with Arduino
« Reply #11 on: November 21, 2022, 08:39:23 pm »
It's really interesting. So if my chips are from 1976, which numbers should I follow? The ones from 1978, because it's closer to the release, or from 1980, because they realized I could use 23V instead of 25V? (and probably prolong the life of EPROM or make written data more stable?. I'm not sure what programming voltage affects exactly)
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5884
  • Country: ca
Re: Intel 8748 uC programming with Arduino
« Reply #12 on: November 21, 2022, 09:28:50 pm »
nice to see an arduino  project put that way    :-+
 
The following users thanked this post: yaros


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf