EEPROM rest

I need to reset/flash an eeprom. does anybody know how to do it using Arduino?

Its for resting supervisor password on a lenovo T61.
The eeprom is NXP P24S08 (data sheet)

Its been done using a Atmel 328p based board. So I was wondering if it could be done using arduino as well.

some sources suggested to short pin 5,6 to by pass the password. I tired many time without success.

Thanks for any help.

Unfortunately, that person is using an Arduino board - but running proprietary code on it which he hasn't shared. He presumably wrote that code by reverse engineering the contents of that EEPROM.

The problem is, it's not clear what you need to send to that EEPROM to write it.

I would try reading it out with the Arduino - it presents the normal AT24 interface, to see how much stuff it had in there.

With AT24's, you erase them by writing 1's (eg, writing 0xFF to each location) - but since we don't know what else they might store in that eeprom, we don't know if just erasing the whole damned thing might delete something that it needs and brick the system.

Thanks DrAzzy.

So if i try to read the content with arduino how would I go about? I’m still a Newbie on arduino. do you know any tutorial or sample ardunio project on reading eeprom on AT24 interface?

I found a simple solution here to read the content and decode it. trouble is it use an actual seiral port. not a virtual via usb like ardunio. I don’t have any serial cable at this moment, have to order one and wait for it :frowning:

I’m not worried about making motherboard brick. it’s as good as brick as it is! and I don’t think it would actually do any harm to the board as long as proper ground is connected. it might burn the chip, which i don’t care, in the worse case scenario i would just buy a damaged motherboard from ebay and replace the whole cheap.(and hope that cheap doesn’t comes with its own password! ha ha). a used/for parts condition t61 motherboard is available as cheap as $10 on ebay. that’s one tenth of the price of so called kmx1!

So there’s a way to do it with UART serial?

What logic levels does the serial run at? You can use an Arduino as a USB <-> 5v TTL serial converter - ground reset (so the atmega328p is held in reset and the pins are tristated) and use pins 0 and 1 (the TX and RX markings on the board correspond to what you’re connecting it to, since they’re TX and RX of the ATMega328p chip, not the USB Serial adapter)- TX and RX are crossed in UART, so one device’s TX goes to the other’s RX).

sorry forgot to add the link on the previous post.... wait 5 minute to edit :stuck_out_tongue:

http://www.allservice.ro/forum/viewtopic.php?t=47

Here is the propose interface.

for the reader program it seems like it must be com1. do you think doing via ardunio would be easier?

Ah - for that you need a full serial adapter (and one which breaks out DTR, RTS, and CTS - though you can make one from one of those $1 CH340G adapters by soldering wires onto the pins, among other things) - you can't do it with an Arduino's built-in serial adapter (at least not an official one).

There are tons of guides and libraries for AT24 EEPROM use on Arduino. It's so dead simple you don't even need a library - have you looked at the datasheet? There is tons of information on google too. The protocol is about as simple as it gets - write a 0 to it to make sure it's looking at the start of the eeprom, and then read out however many bytes you want. To write, you write the address followed by the data to write there. The two high bits of the memory address are the two low bits of the I2C address (since they need 10 bits of addressing, but didn't want to require a second byte to set that...)

DrAzzy:
So there’s a way to do it with UART serial?

What logic levels does the serial run at? You can use an Arduino as a USB <-> 5v TTL serial converter - ground reset (so the atmega328p is held in reset and the pins are tristated) and use pins 0 and 1 (the TX and RX markings on the board correspond to what you’re connecting it to, since they’re TX and RX of the ATMega328p chip, not the USB Serial adapter)- TX and RX are crossed in UART, so one device’s TX goes to the other’s RX).

I don’t know if you know this, but the FTDI 232R chip has a BIT-BANG mode where you can do digital I/O with all of the pins.

I’ve already made a USB to SPI converter program that drives a VFD or LCD with an SPI input. Couple that with “readline” from standard input and you can “print” data right from the computer to the display.

Anyway, the point is that it should be ultra-easy to make an ICSP out of the FTDI chip… a project that I’m beginning right now actually.

The bit-bang mode should also make it easy to directly access SPI and I2C devices like serial flash and EEPROM chips… maybe that’s a way to “get into” the motherboard EEPROM.

“Anyway, the point is that it should be ultra-easy to make an ICSP out of the FTDI chip”

That’s how I used to bootload 328P chips:
http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
Was a slow process. Dropped if for a USB ASP programmer after not too many chips.
And then Atmel AVR ISP MKii when I started playing with Atmel Studio and 1284P chips.
Now I have my own programmers too
http://www.crossroadsfencing.com/BobuinoRev17/


(that one is actually loading my Duemilanove modified with pins for the link above)

CrossRoads:
“Anyway, the point is that it should be ultra-easy to make an ICSP out of the FTDI chip”

That’s how I used to bootload 328P chips:
http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
Was a slow process. Dropped if for a USB ASP programmer after not too many chips.
And then Atmel AVR ISP MKii when I started playing with Atmel Studio and 1284P chips.

I’ve also got (several) “genuine” Atmel MK-II programmers. I just figured making one out of an FTDI breakout board would be a fun brain exercise.

The FTDI in bit-bang mode is very slow… IF you send one byte at a time because of the overhead of the USB communications protocol. However, the FTDI is capable of sending a burst of up to 64 bytes, so what I do is build up a packet of bit patterns, then burst it to the FTDI all in one shot. Here’s a piece of the code that does the burst:

// low level bit banger FTDI->VFD
void displayWrite (uint8_t dat, uint8_t reg)
{
    uint8_t buf[64]; // buffer for bit patterns
    uint8_t bits;
    uint8_t cmd = 0b11111000; // serial command byte skeleton
    uint8_t c = (SISO | STB | SCK); // initially set all pins high
    uint8_t idx;
    uint16_t data;

    reg ? cmd |= RS_BIT : cmd &= ~RS_BIT; // select cmd/data
    data = ((cmd << 8) | dat); // build 16 bit command word
    idx = 0; // init index
    c &= ~STB; // assert strobe (low)
    buf[idx++] = c; // copy to buffer
    bits = 16; // 16 bit command word

    while (bits--) { // write out bits
        c &= ~SCK; // lower sck
        buf[idx++] = c; // copy to buffer
        data &_BV (bits) ? c |= SISO : c &= ~SISO; // write a bit
        buf[idx++] = c; // copy to buffer
        c |= SCK; // raise sck
        buf[idx++] = c; // copy to buffer
    }

    c |= STB; // de-assert strobe (high)
    buf[idx++] = c; // copy to buffer
    ftdi_write_data (&ftdic, buf, idx); // write out buffer
}

At first I was just and-ing and or-ing to each “buf[idx++]” and it wasn’t working. I finally transferred the code to a test program (Linux console mode) and did a dump of each byte. I realized that I needed a “shadow” byte (the var “c” in the code) to maintain the last bit pattern and then MODIFY the bit pattern as needed and copy it to the buffer.

Then I put the fixed code back into the Arduino side and taa-daa! It worked!

In fact, when sending single bytes, I can actually watch the characters appear on the VFD display (looks like an old 1200 baud modem), but in burst mode I actually have to set the FTDI baud rate to 9600 to slow it down or else the VFD can’t handle it!

The FTDI chip also has an 8 bit “parallel port mode” (not as in printer, but as in one byte at a time). I was using a Sparkfun FTDI breakout board that doesn’t break out ALL the pins, so I’ve got a couple cheap-o ones on order from Amazon that have all the pins broken out.

Can’t wait to see how that works! :slight_smile:

CrossRoads:
Now I have my own programmers too

OOOOOoooooooh! I like this:

Especially since you did it "right" (i.e. used a crystal instead of a resonator).

How do I buy one? Send you a check, or do you take cards? Please let me know.

-- Roger