Compare commits
2 Commits
7d40ea6705
...
af46f2686c
Author | SHA1 | Date |
---|---|---|
Tom Nisbet | af46f2686c | |
Tom Nisbet | 18bb15bec6 |
|
@ -130,7 +130,7 @@ bool PromDevice27::burnByteWE(byte value, uint32_t address)
|
|||
writeDataBus(value);
|
||||
delayMicroseconds(1);
|
||||
enableWrite();
|
||||
myDelay(mPulseWidthUsec * mOverwriteMultiplier);
|
||||
myDelay(mPulseWidthUsec * mOverwriteMultiplier * (writeCount + 1));
|
||||
disableWrite();
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,18 @@ bool PromDevice27::burnByteCE(byte value, uint32_t address)
|
|||
enableOutput();
|
||||
status = readDataBus() == value;
|
||||
disableOutput();
|
||||
}
|
||||
} else {
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (status && (mOverwriteMultiplier > 0)) {
|
||||
setDataBusMode(OUTPUT);
|
||||
writeDataBus(value);
|
||||
delayMicroseconds(1);
|
||||
enableChip();
|
||||
myDelay(mPulseWidthUsec * mOverwriteMultiplier * (writeCount + 1));
|
||||
disableChip();
|
||||
}
|
||||
|
||||
setDataBusMode(INPUT);
|
||||
|
@ -244,15 +255,15 @@ ERET PromDevice27::erase(uint32_t start, uint32_t end)
|
|||
}
|
||||
|
||||
|
||||
void PromDevice27::myDelay(unsigned int us)
|
||||
void PromDevice27::myDelay(uint32_t us)
|
||||
{
|
||||
if (us > 16000) {
|
||||
// The delayMicroseconds code can't do delays longer than 16ms, so use the
|
||||
// ms delay code for larger values. This rounds down to the nearest ms, so
|
||||
// it is not possible to delay for 40.5 ms, for example.
|
||||
delay(us / 1000);
|
||||
delay(uint16_t(us / 1000));
|
||||
} else {
|
||||
delayMicroseconds((unsigned int) us);
|
||||
delayMicroseconds(uint16_t(us));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class PromDevice27 : public PromDevice
|
|||
|
||||
bool burnByteWE(byte value, uint32_t address);
|
||||
bool burnByteCE(byte value, uint32_t address);
|
||||
void myDelay(unsigned int us);
|
||||
void myDelay(uint32_t us);
|
||||
|
||||
E27C_PGM mPgmType;
|
||||
unsigned long mPulseWidthUsec;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "XModem.h"
|
||||
|
||||
|
||||
static const char * MY_VERSION = "3.6";
|
||||
static const char * MY_VERSION = "3.7";
|
||||
|
||||
|
||||
// Global status
|
||||
|
@ -41,14 +41,15 @@ PromDevice28C prom(32 * 1024L, 64, 10, true);
|
|||
#elif defined(PROM_IS_27)
|
||||
// Define a device for a 2764 EPROM with the following parameters:
|
||||
// 8K byte device capacity
|
||||
// PGM pin pulses active LOW
|
||||
// Program using dedicated WR pin
|
||||
// 1000us (1ms) write pulse
|
||||
// 15 write attempts
|
||||
// 4x overwrite pulse
|
||||
// Max 15 write attempts
|
||||
// 4x overwrite pulse (4 * writePulseLength * numberOfPulsesWritten)
|
||||
// (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(32 * 1024L, E27C_PGM_CE, 1000L, 25, 3); // M27256 with fast 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
|
||||
|
@ -337,6 +338,7 @@ bool checkForBreak()
|
|||
word checksumBlock(uint32_t start, uint32_t end)
|
||||
{
|
||||
word checksum = 0;
|
||||
#if 1
|
||||
for (uint32_t addr = start; (addr <= end); addr += 2)
|
||||
{
|
||||
word w = prom.readData(addr);
|
||||
|
@ -344,6 +346,25 @@ word checksumBlock(uint32_t start, uint32_t end)
|
|||
w |= prom.readData(addr + 1);
|
||||
checksum += w;
|
||||
}
|
||||
#else
|
||||
uint16_t crc = 0xffff;
|
||||
for (uint32_t addr = start; (addr <= end); addr++)
|
||||
{
|
||||
crc = crc ^ (uint16_t(prom.readData(addr)) << 8);
|
||||
for (int ix = 0; (ix < 8); ix++)
|
||||
{
|
||||
if (crc & 0x8000)
|
||||
{
|
||||
crc = (crc << 1) ^ 0x1021;
|
||||
}
|
||||
else
|
||||
{
|
||||
crc <<= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
checksum = crc;
|
||||
#endif
|
||||
|
||||
return checksum;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ 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|
|
||||
|M27256 |ST Micro |EPROM |27 |VCC=6V, VPP=12.5V to pgm|
|
||||
|M27C256 |ST Micro |EPROM |27 |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|
|
||||
|
@ -213,6 +214,10 @@ while the programming voltages are present.
|
|||
|
||||
This chip can only be erased with UV light, so the erase command is not supported.
|
||||
|
||||
### M27256
|
||||
|
||||
This is an older version of the M27C256. Pin connections are the same, but for programming Vcc=6V and Vpp=12.5V. The programming pulse width is 1ms instead of 100us, and the programming algorithm uses an overwrite pulse equal to 3ms * the number of program pulses written.
|
||||
|
||||
### W27C257 and W27C512
|
||||
|
||||
The Winbond W27C257 and W27E257 appear to be identical 32Kx8 EEPROMs. The 27C version
|
||||
|
|
|
@ -30,3 +30,4 @@ exerpt: "What's New in TommyPROM"
|
|||
|3.4 |2024-04-09 |Support 2316,2332, and 2364 mask-programmed ROMs|
|
||||
|3.5 |2024-04-12 |jcranes's updates to CLI for better parameter defaults and additional error checking|
|
||||
|3.6 |2024-04-23 |Remove debug commands by default - can be enabled in Configure.h|
|
||||
|3.7 |2024-05-03 |Change overwrite algorithm for 27 series to match SEEQ and M27256 datasheets|
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
(33 F.Adhes user hide)
|
||||
(34 B.Paste user hide)
|
||||
(35 F.Paste user hide)
|
||||
(36 B.SilkS user)
|
||||
(37 F.SilkS user)
|
||||
(36 B.SilkS user hide)
|
||||
(37 F.SilkS user hide)
|
||||
(38 B.Mask user hide)
|
||||
(39 F.Mask user hide)
|
||||
(40 Dwgs.User user hide)
|
||||
|
@ -86,7 +86,7 @@
|
|||
(mirror false)
|
||||
(drillshape 0)
|
||||
(scaleselection 1)
|
||||
(outputdirectory "./edge-card-32"))
|
||||
(outputdirectory "./edge-card-32v2"))
|
||||
)
|
||||
|
||||
(net 0 "")
|
||||
|
|
Loading…
Reference in New Issue