Replies: 6 comments 13 replies
-
The current hardware and software design of TommyPROM already supports 19 addresses with a Nano - 16 from the shift register and 3 as direct I/O pins. I've used this to read 29C040 chips successfully. If you want to use a different Arduino, you will almost certainly need to change the code that writes to the pins. Most of this is in PromDevice.cpp. Your bigger problem is that the 29C devices are sector-based flash chips. You must write all of the byes for a sector in the same operation. Depending on the manufacturer of your chip this may be a problem. I have seen 29C040 chips with sector sizes of 64, 128, or 256 bytes. The smaller two shouldn't be an issue and may even work with the stock 28C code that TommyPROM uses by default. If not, there may be some small changes needed to the block programming algorithm - I haven't looked at those chips in a while. If your chip has a 256 byte sector then the problem gets a bit more difficult. The XModem protocol uses a 128 byte block size and the code just does a block write when a new chunk of data is received. This would cause the chip to erase the sector, write the first 128 bytes, and then erase the sector again before writing the second 128 bytes. You would need to modify the code to keep a second buffer and write them both at once as a single block to the chip. Let me know if you decide to move forward with this. I may be able to offer some guidance if you get stuck. Tom |
Beta Was this translation helpful? Give feedback.
-
Thanks Tom,
I’m using Atmel chips for all of my EEPROMs except the 29C040 4M (512K x 8) chip. For that I’m using a Microchip SST39SF040 chip (faster access time than the Atmel chip). It’s programmed quite differently than the Atmel chip.
The SST39SF040 uses 4K sectors for erasing a single sector (the entire chip can also be erased with a single command), but writes on a byte-by-byte basis. Here’s the description from the datasheet (my italics):
Byte-Program Operation
The SST39SF010A/020A/040 are programmed on a byte-by-byte basis. Before programming, the sector where the byte exists must be fully erased. The Program operation is accomplished in three steps.
The first step is the three-byte load sequence for Software Data Protection. The second step is to load byte address and byte data. During the Byte-Program operation, the addresses are latched on the falling edge of either CE# or WE#, whichever occurs last. The data is latched on the rising edge of either CE# or WE#, whichever occurs first. The third step is the internal Program operation which is initiated after the rising edge of the fourth WE# or CE#, whichever occurs first. The Program operation, once initiated, will be completed, within 20 µs. See Figures 6 and 7 for WE# and CE# controlled Program operation timing diagrams and Figure 16 for flowcharts. During the Program operation, the only valid reads are Data# Polling and Toggle Bit. During the internal Program operation, the host is free to perform additional tasks. Any commands written during the internal Program operation will be ignored.
I read this to mean that the host can pass the data to be written one byte/address at a time.
Here’s the datasheet, if you’re interested:
https://1drv.ms/b/s!AutOq5wvw8K5qex9wOUgxxU6wOaUgA
I haven’t tried programming this thing yet, but it appears I should be able to just feed n sequential bytes of data directly to the chip (setting the address pins accordingly), one byte at a time, without having to manage multiple buffers.
Your take?
Paul
…On Aug 12, 2022, 11:45 AM -0400, Tom Nisbet ***@***.***>, wrote:
The current hardware and software design of TommyPROM already supports 19 addresses with a Nano - 16 from the shift register and 3 as direct I/O pins. I've used this to read 29C040 chips successfully.
If you want to use a different Arduino, you will almost certainly need to change the code that writes to the pins. Most of this is in PromDevice.cpp.
Your bigger problem is that the 29C devices are sector-based flash chips. You must write all of the byes for a sector in the same operation. Depending on the manufacturer of your chip this may be a problem. I have seen 29C040 chips with sector sizes of 64, 128, or 256 bytes. The smaller two shouldn't be an issue and may even work with the stock 28C code that TommyPROM uses by default. If not, there may be some small changes needed to the block programming algorithm - I haven't looked at those chips in a while.
If your chip has a 256 byte sector then the problem gets a bit more difficult. The XModem protocol uses a 128 byte block size and the code just does a block write when a new chunk of data is received. This would cause the chip to erase the sector, write the first 128 bytes, and then erase the sector again before writing the second 128 bytes. You would need to modify the code to keep a second buffer and write them both at once as a single block to the chip.
Let me know if you decide to move forward with this. I may be able to offer some guidance if you get stuck.
Tom
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I'm actually working on an SST39 driver right now. I've already managed to program one by adding the byte unlock sequence and changing the control line code a bit. I just need to add code that keeps track of the current sector and erase it before writing. This is a bit different from the 29C chips, where the chip automatically erases the sector with each write. The advantage to the SST39 chips is that you don't need to write all of your data at once. I'm working on my real job at the moment, but may be able to get the initial SST39 code checked in today. |
Beta Was this translation helpful? Give feedback.
-
Wow, you’re doing all my hard work!
Does the TommyPROM UI allow for programming an individual sector? If not, you could just erase the entire device with one command, no need to erase sector by sector.
Paul
…On Aug 12, 2022, 1:02 PM -0400, Tom Nisbet ***@***.***>, wrote:
I'm actually working on an SST39 driver right now. I've already managed to program one by adding the byte unlock sequence and changing the control line code a bit. I just need to add code that keeps track of the current sector and erase it before writing. This is a bit different from the 29C chips, where the chip automatically erases the sector with each write. The advantage to the SST39 chips is that you don't need to write all of your data at once.
I'm working on my real job at the moment, but may be able to get the initial SST39 code checked in today.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I’m happy to field test your SST39 sriver, since I have some of those. I think I have everything I need to build a TommyPROM.
Your code is well designed, easy to follow.
Paul
…On Aug 12, 2022, 1:07 PM -0400, ***@***.***, wrote:
Wow, you’re doing all my hard work!
Does the TommyPROM UI allow for programming an individual sector? If not, you could just erase the entire device with one command, no need to erase sector by sector.
Paul
On Aug 12, 2022, 1:02 PM -0400, Tom Nisbet ***@***.***>, wrote:
> I'm actually working on an SST39 driver right now. I've already managed to program one by adding the byte unlock sequence and changing the control line code a bit. I just need to add code that keeps track of the current sector and erase it before writing. This is a bit different from the 29C chips, where the chip automatically erases the sector with each write. The advantage to the SST39 chips is that you don't need to write all of your data at once.
> I'm working on my real job at the moment, but may be able to get the initial SST39 code checked in today.
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
“driver”
Paul
…On Aug 12, 2022, 5:40 PM -0400, ***@***.***, wrote:
I’m happy to field test your SST39 sriver, since I have some of those. I think I have everything I need to build a TommyPROM.
Your code is well designed, easy to follow.
Paul
On Aug 12, 2022, 1:07 PM -0400, ***@***.***, wrote:
> Wow, you’re doing all my hard work!
>
> Does the TommyPROM UI allow for programming an individual sector? If not, you could just erase the entire device with one command, no need to erase sector by sector.
>
> Paul
> On Aug 12, 2022, 1:02 PM -0400, Tom Nisbet ***@***.***>, wrote:
> > I'm actually working on an SST39 driver right now. I've already managed to program one by adding the byte unlock sequence and changing the control line code a bit. I just need to add code that keeps track of the current sector and erase it before writing. This is a bit different from the 29C chips, where the chip automatically erases the sector with each write. The advantage to the SST39 chips is that you don't need to write all of your data at once.
> > I'm working on my real job at the moment, but may be able to get the initial SST39 code checked in today.
> > —
> > Reply to this email directly, view it on GitHub, or unsubscribe.
> > You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I need to program some larger ATMEL EEPROMs, specifically the 29C040 512K x 8 EEPROM, a 32-pin DIP with 19 address and 8 data pins. The Nano doesn't have enough I/O pins, and I want to drive the EEPROMs' pins directly, without having to multiplex any pins.
I'm thinking of using a Teensy 4.1, which has more than enough I/O pins and lots of raw horsepower (600 MHz).
Other than having to modify the TommyPROM code to drive the address pins directly (no need to multiplex pins) and change the pin port assignments, is there anything else I'd need to change to get the TommyPROM working with the Teensy? Since the Teensy runs so much faster than the Nano, would I need to "throttle back" the Teensy, or can it just run at full speed?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions