2
0
mirror of https://github.com/TomNisbet/TommyPROM.git synced 2024-12-30 13:29:46 +00:00

add support for M27C256

This commit is contained in:
Tom Nisbet 2023-09-20 16:43:03 -04:00
parent 69508f5d95
commit 8ec224cb61
4 changed files with 62 additions and 12 deletions

View File

@ -35,6 +35,7 @@ class PromDevice
virtual ERET disableSoftwareWriteProtect() { return RET_NOT_SUPPORT; }
virtual ERET enableSoftwareWriteProtect() { return RET_NOT_SUPPORT; }
virtual ERET erase(uint32_t start, uint32_t end) { return RET_NOT_SUPPORT; }
virtual bool is_readback_safe() { return true; }
uint32_t debugBlockWrites; // Number of block write operations
uint32_t debugLastAddress; // Last address with an issue

View File

@ -17,10 +17,11 @@
* 27 or 27C series parallel EPROM using the Arduino. Supported chips
* include 2716, 2732, 2764, 27C040, and 27C2001.
*
* Intelligent programming algorithms, like TurboProgram, are supported.
* These allow a variable number of shorter program pulses until the byte
* verifies. This is optionally followed by an overprogram pulse that is
* a multiple of the number of program pulses that were written.
* Intelligent programming algorithms, like TurboProgram and Presto II, are supported.
* These allow a variable number of shorter program pulses until the byte verifies. This
* is optionally followed by an overprogram pulse that is a multiple of the number of
* program pulses that were written.
*
*
* See the constructor definition for an explanation of the parameters that
* control programming.
@ -40,6 +41,7 @@ class PromDevice27 : public PromDevice
void begin();
const char * getName() { return "27 series EPROM"; }
ERET erase(uint32_t start, uint32_t end);
bool is_readback_safe() { return mPgmType != E27C_PGM_CE; }
protected:
void setAddress(uint32_t address);

View File

@ -47,11 +47,12 @@ PromDevice28C prom(32 * 1024L, 64, 10, true);
// (true) verify data byte after writing
//PromDevice27 prom(8 * 1024L, E27C_PGM_WE, 1000L, 15, 4); // 2764 with SEEQ intelligent programming
//PromDevice27 prom(32 * 1024L, E27C_PGM_WE, 1000L, 25, 3); // 27C256 with SEEQ intelligent programming
PromDevice27 prom(32 * 1024L, E27C_PGM_CE, 100L, 25, 0); // M27C256 with Presto II intelligent programming
//PromDevice27 prom(2 * 1024L, E27C_PGM_WE, 50000L, 1, 0); // 2716 with single 50ms write
//PromDevice27 prom(512 * 1024L, E27C_PGM_CE, 100L, 11, 0); // 27C040 with Atmel rapid programming, CE connected to CE#/PGM#
//PromDevice27 prom(32 * 1024L, E27C_PGM_CE, 100L, 25, 0); // W27C257/W27E257 with 100uS program pulse on CE
//PromDevice27 prom(64 * 1024L, E27C_PGM_CE, 100L, 1, 0, false); // W27C512 with single 100uS program pulse on CE, no verify
PromDevice27 prom(256 * 1024L, E27C_PGM_WE, 20L, 1, 0, false); // SST27SF020 with single 20us write, no verify
//PromDevice27 prom(256 * 1024L, E27C_PGM_WE, 20L, 1, 0, false); // SST27SF020 with single 20us write, no verify
#elif defined(PROM_IS_SST39SF)
// Define a device for anSST39SF Flash with the following parameters:
@ -491,6 +492,13 @@ void pokeBytes(char * pCursor)
}
delay(100);
if (!prom.is_readback_safe()) {
// This chip uses the CE line for write control, so don't do the read because it
// could cause a write operation that would corrupt the data.
cmdStatus.info("Poke complete");
return;
}
for (unsigned ix = 0; ix < byteCtr ; ix++)
{
byte val = prom.readData(start + ix);
@ -621,6 +629,14 @@ void zapTest(uint32_t start)
}
delay(100);
if (!prom.is_readback_safe()) {
// This chip uses the CE line for write control, so don't do the read because it
// could cause a write operation that would corrupt the data.
cmdStatus.info("Write test complete");
return;
}
for (unsigned ix = 0; ix < sizeof(testData); ix++)
{
byte val = prom.readData(start + ix);

View File

@ -37,8 +37,9 @@ different chip technologies.
|AT29C010 |Atmel |Flash |28C |Only with 128 byte or less sector size|
|SST39SF040|Microchip |Flash |SST39SF|All SST39SF0x0 supported|
|SST28SF040|SST |Flash |SST28SF|All SST28SF0x0 supported|
|SST27SF020|SST |Flash |27 |12V continuous for pgm/erase|
|M27C256 |ST Micro |EPROM | |VCC=6.5V, VPP=12.75V to pgm|
|W27C257 |Winbond |EEPROM |27 |Continuous 12V or 14V for program/erase|
|SST27SF020|SST |Flash |27 |12V continuous for pgm/erase|
|8755A |Intel |EPROM |8755A |Requires 25V pulses to program|
@ -101,7 +102,8 @@ hardware](pcb#TommyPROM32) for a diode circuit that allows the programming volta
switched between Vcc and a higher voltage.
Check the [Chip Details](#27c-and-27e-series-eproms-and-flash) for the high voltage
connections for a particular chip or consult your data sheet.
connections for a particular chip or consult your data sheet. Also note the warning in
that section about issuing other commands while the programming voltage is asserted.
Chips that use high voltage pulses for each byte are not supported. For those chips, some
elements of the [8755A hardware](8755A-hardware) may be leveraged to build a version of
@ -119,7 +121,8 @@ contains a 2KB EPROM plus two general-purpose I/O ports. The 8355 is a one-time
programmable version of the 8755. The 8755 requires a 25V programming pulse for each byte
to be written.
A new hardware build was created to support the 8755 chips. Because the 8755 has a multiplexed data and address bus, the usual shift registers are not used for addressing.
A new hardware build was created to support the 8755 chips. Because the 8755 has a
multiplexed data and address bus, the usual shift registers are not used for addressing.
The chip only needs 8 connects that are shared for address and data, plus three dedicated
address lines. The Arduino has enough pins to drive all of these directly, without the
need for shift registers to create address lines.
@ -160,6 +163,32 @@ used to enable and disable SDP from the command line.
## 27C and 27E Series EPROMs and Flash
*WARNING*: Some chips in this series use the _CE_ and _OE_ pins in non-standard ways when
the high voltage is asserted on _VPP_. Because the programming voltage is switched
manually, care needs to be taken when using chips that pulse the _CE_ pin for
programming. The programming code itself knows how to manage this, but other commands,
like the DUMP command, will also toggle _CE_. If the programming voltage is asserted,
these other commands can inadvertently cause a write operation. Be sure to assert the
programming voltage, issue the needed write commands, and then remove the high voltage
before issuing and additional commands that may corrupt the data.
### M27C256
The M27C256 is a 32Kx8 byte UV-erasable EPROM. It needs two special voltages for
programming. _VPP_ must be raised to 12.75V and _VCC_ must be raised to 6.25V. Be sure
to isolate the chip's _VCC_ pin from other Vcc connections so that the 6.25V is not fed
back into the Adbuino or into the shift registers.
This chip does not have a dedicated _PGM_ or _WE_ pin, so programming and verify are
controlled by the _E_ (Chip Enable) and _G_ (Output Enable) pins. The _CE_ pin is pulsed
to program bytes into a location. To verify, the _OE_ pin is asserted, but the _CE_ pin
is not.
Note the warning in the section above about data corruption from issuing other commands
while the programming voltages are present.
This chip can only be erased with UV light, so the erase command is not supported.
### W27C257 and W27C512
The Winbond W27C257 and W27E257 appear to be identical 32Kx8 EEPROMs. The 27C version
@ -168,11 +197,12 @@ has been tested. The Winbond W27C512 is a 64Kx8 EEPROM with no dedicated _VPP_
The 257 EEPROMs have a _VPP_ pin that needs a constant 12V during programming. Unlike the
newer 28C EEPROMs, these chips do not automatically erase before writing to a location.
Instead, the entire chip is erased by applying 14V to _VPP_ and _A9_ and then pulsing
_CE_.
_CE_. To erase the chip, assert the voltages on _VPP_ and _A9_ and then issue the
_Erase_ command from the terminal.
Unlike the 257 chips, the W27C512 does not have a dedicated pin for the programming
voltage and instead uses the OE pin to place the chip in programming mode. The verify
operation requires that the OE pin be switched to _LOW_ and there is no hardware support
voltage and instead uses the _OE_ pin to place the chip in programming mode. The verify
operation requires that the _OE_ pin be switched to _LOW_ and there is no hardware support
for this, so the current code supports the 512 chip by doing a single write cycle with no
verify.
@ -257,8 +287,9 @@ pulsing _WE_.
|AMS - Advanced Memory Systems|AMS |Merged with Intersil|
|AMD - Advanced Micro Devices |AM ||
|Atmel |AT |Aquired by Microchip|
|CSI - Catalyst Semiconductor |CAT |Purchased by ON Semiconductor|
|CSI - Catalyst Semiconductor |CAT |Aquired by ON Semiconductor|
|Intel |i ||
|Seeq Technology | |Aquired by LSI Logic|
|SST - Silicon Storage Tech |ST |Aquired by Microchip|
|ST Microelectronics |M ||
|Winbond |W ||