mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-27 23:14:14 +01:00
V33B: Updated 27C322 timings
The first 10 words still do not get written though, not sure if I need something like a setup delay or if my eprom is broken. Too enable the eprom menu for testing 27C322 flashing change the following lines in Flash.ino: // create menu with title and 3 options to choose from unsigned char flashSlot; // Copy menuOptions out of progmem convertPgm(menuOptionsFlash, 3); flashSlot = question_box("Select flashrom slot", menuOptions, 3, 0);
This commit is contained in:
parent
72a1a6d7c8
commit
f9c89d4666
@ -3,7 +3,7 @@
|
||||
|
||||
Author: sanni
|
||||
Date: 04-21-2018
|
||||
Version: V33A
|
||||
Version: V33B
|
||||
|
||||
SD lib: https://github.com/greiman/SdFat
|
||||
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
||||
@ -35,7 +35,7 @@
|
||||
infinest - help with GB Memory cart
|
||||
|
||||
**********************************************************************************/
|
||||
char ver[5] = "V33A";
|
||||
char ver[5] = "V33B";
|
||||
|
||||
/******************************************
|
||||
Define Starting Point
|
||||
|
@ -1643,24 +1643,33 @@ void writeWord_Eprom(unsigned long myAddress, word myData) {
|
||||
PORTA = (myData >> 8) & 0xFF;
|
||||
|
||||
// Arduino running at 16Mhz -> one nop = 62.5ns
|
||||
// Wait till output is stable
|
||||
__asm__("nop\n\t");
|
||||
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t");
|
||||
|
||||
// Switch VPP/OE(PH5) to HIGH
|
||||
PORTH |= (1 << 5);
|
||||
// Wait 1us for VPP High to Chip Enable Low
|
||||
delayMicroseconds(1);
|
||||
// Setting CE(PH6) LOW
|
||||
PORTH &= ~(1 << 6);
|
||||
|
||||
// Leave VPP HIGH for a 50us programming pulse
|
||||
delayMicroseconds(50);
|
||||
// Leave VPP HIGH for 50us Chip Enable Program Pulse Width
|
||||
delayMicroseconds(55);
|
||||
|
||||
// Setting CE(PH6) HIGH
|
||||
PORTH |= (1 << 6);
|
||||
// Wait 2us for Chip Enable High to VPP Transition
|
||||
delayMicroseconds(2);
|
||||
// Switch VPP/OE(PH5) to LOW
|
||||
PORTH &= ~(1 << 5);
|
||||
|
||||
// Leave VPP LOW for a little bit
|
||||
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
|
||||
// Leave CE High for 1us for VPP Low to Chip Enable Low
|
||||
delayMicroseconds(1);
|
||||
|
||||
// Setting CE(PH6) LOW
|
||||
PORTH &= ~(1 << 6);
|
||||
|
||||
// Wait 1us for Chip Enable Low to Output Valid while program verify
|
||||
delayMicroseconds(1);
|
||||
}
|
||||
|
||||
word readWord_Eprom(unsigned long myAddress) {
|
||||
@ -1673,11 +1682,12 @@ word readWord_Eprom(unsigned long myAddress) {
|
||||
PORTL = (myAddress >> 16) & 0xFF;
|
||||
|
||||
// Arduino running at 16Mhz -> one nop = 62.5ns
|
||||
__asm__("nop\n\t");
|
||||
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t");
|
||||
|
||||
// Setting CE(PH6) LOW
|
||||
PORTH &= ~(1 << 6);
|
||||
|
||||
// Delay for at least 100ns for read
|
||||
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
|
||||
|
||||
// Read
|
||||
@ -1693,7 +1703,6 @@ word readWord_Eprom(unsigned long myAddress) {
|
||||
}
|
||||
|
||||
void blankcheck_Eprom() {
|
||||
|
||||
println_Msg(F("Please wait..."));
|
||||
display_Update();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user