Trying to rip a MX23C6410 with an Arduino Mega - little help? #77
Unanswered
AJRubenstein
asked this question in
Q&A
Replies: 1 comment
-
It looks like you never brought the OE and CE pins low to read the chip. From the data sheet, it looks like you can just tie them low. You may also want to set the data lines to INPUT_PULLUP instead of INPUT if the mega supports that. It will give you more consistent results if you inadvertently read a chip that isn't enabled. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey folks,
I know that this project is for smaller arduinos, but I'm sorta at my wits end with a project I'm mucking around with.
I've got a MC23c6410 Mask rom I'm trying to dump purely as an exercise at this point - I accidentally purchased the chip and want to use it as a dry run for dumping some other ROMs that are in the same format.
Long story short, I've written a very basic sketch with a little AI help - done a whole bunch of different tests, and always get really weird results. Can anyone give me an idea of what's going wrong? Basically I get completely random reads from the chip - it's clearly not reading correctly, hence me locking the output to a set address... I've confirmed that the voltage is a smooth 5v as well. Basically it's hooked up to an arduino mega directly to each pin. Maybe I'm missing something?
Here's the sketch. I'd really appreciate if anyone has any ideas. Thanks!
#include <stdint.h>
#define MAX_ADDR 8000000L // 8MB address space (for the 4M x 16 chip configuration)
#define START 0 // Starting address
// Define control signal pins
#define CE_pin 12
#define OE_pin 13
#define BYTE_pin 11
bool startReading = false; // Flag to indicate whether to start reading
void setup() {
// Set control pins to outputs
pinMode(CE_pin, OUTPUT);
pinMode(OE_pin, OUTPUT);
pinMode(BYTE_pin, OUTPUT);
// Set control pins initial state
digitalWrite(CE_pin, HIGH); // Disable the chip initially
digitalWrite(OE_pin, HIGH); // Disable output initially
digitalWrite(BYTE_pin, HIGH); // Set to 16-bit mode (BYTE pin HIGH)
// Initialize address pins (22-43)
for (int i = 22; i <= 43; i++) {
pinMode(i, OUTPUT); // Set address pins to output
}
// Initialize data pins (A0-A15) for reading (input mode)
for (int i = A0; i <= A15; i++) {
pinMode(i, INPUT); // Set data pins to input mode
}
// Initialize serial communication for debugging and data output
Serial.begin(9600);
// Wait for start signal over Serial
Serial.println("Waiting for start signal...");
}
// Function to write the address to the address pins (22-43)
void writeAddr(uint32_t addr) {
// Write each bit of the address to the corresponding pin (A0-A21)
for (int i = 0; i < 22; i++) {
digitalWrite(22 + i, (addr >> i) & 1); // Set each address bit on pins 22-43
}
}
// Function to read 16-bit data from the data pins (A0-A15)
uint16_t readData() {
uint16_t data = 0;
for (int i = 0; i < 16; i++) {
data |= (analogRead(i) & 1) << i; // Read each data bit (D0-D15)
}
return data;
}
void loop() {
// Check if the 'start' signal has been received
if (Serial.available() > 0) {
String command = Serial.readStringUntil('\n');
command.trim();
}
// If the start signal is received, begin reading memory
if (startReading) {
uint32_t addr = 0x000000; // Start address
}
}
Beta Was this translation helpful? Give feedback.
All reactions