Pages: [1]   Go Down
Author Topic: Burn a 29LV160 flash chip  (Read 1759 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, greetings everyone. Im trying to burn a MXIC 29LV160 flash chip with a binary file but after reading the datasheet for this chip im still stuck without any ideas of how to begin. Im good at programming but a total newbie with arduino so any help would be appreciated.

Here is the pinout for this specific chip:


Can post the datasheet too if that helps (but its very easy to find on the net).

Tools I have on hand:
- Arduino (UNO and MEGA);
- Bus Blaster / Bus Pirate from dangerous prototypes (if that helps)
- Usual electronic stuff smiley-razz

Thanks in advance!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8940
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you want to write by bytes or words?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

According to the datasheet I can do both (afaik). I guess doing a loop writing it by bytes would be easier. Does this matter depending of my source file (a binary file)?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8940
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To write each byte, put the byte address on the 21 address pins (A-1 through A19), put the data on Q0 through Q7, set /WE low, and pulse /CE low.  Keep /BYTE low, /RESET and /OE high.

You need 31 output pins so you should use the Mega.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could you please elaborate a bit in the code?  smiley-red

When you say I should "put the data on Q0 through Q7" you mean i should write each bit in one different pin and then pulse CE to write these 8 bits? And how should I "put the address on the adress pins"? Sorry if this look like very basic questions but if you could give me an example (in C code or pseudo) that would be great. Thanks
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8940
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Something like this:

Code:
unsigned long int address = 0;

if (Serial.avaialble()) {
    data = Serial.read();
    for (int aPin=0; aPin<21; aPin++)
         digitalWrite(addressPins[aPin], address & (1<<aPin));
    for (int dPin=0; dPin < 8; dPin++)
         digitalWrite(dataPins[dPin], data & (1<<dPin));
    digitalWrite(ChipEnablePin, LOW)
    digitalWrite(ChipEnablePin, HIGH);
    address++;
    }
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2086
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

..most probably you have to check the READY/BUSY pin during the flashing as well..
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep, looks like the chip returns it status in this pin while flashing. Another question is how do I address the chip using A0~A19 pins? Since the address are in hexadecimal can I just convert it to binary and thats it or do I need to do something else?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8940
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Another question is how do I address the chip using A0~A19 pins? Since the address are in hexadecimal can I just convert it to binary and thats it or do I need to do something else?

You never said anything about hexadecimal addresses.  You said it was a BINARY file.

You convert the address from hex to a number.  If it's a byte address you can then use it directly on A-1 through A19.  If the address is a word address you can use it directly on A0-A19 and then set A-1 for which of the two bytes of the word you are writing.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes it is a bin file, but isnt the addressing related to the flash chip memory address?
Logged

Pages: [1]   Go Up
Jump to: