I just read the content of a 27256 from an old car ECM (1994 Mazda MX6) I had lying around using this code and a Mega2560. If you have a Mega and follow the connections (and tie E to GND) you should be able to print the content to the serial monitor as I did. What you can do with the result is another matter...
(the last few lines of the output)
.
.
.
30 93 34 23 0C 8F 96 33 BD FD 94 40 50 82 00 20
0A 40 50 82 00 8F 96 33 BD FD 94 D3 30 39 D6 30
27 1A 5F D7 30 4C D6 31 27 07 E6 01 11 25 01 17
39 4D 2B 07 A6 01 CE 01 01 DF 30 39 4A D6 31 26
09 43 E6 00 11 25 01 17 43 39 4D 2A 08 A6 00 43
CE 01 00 DF 30 39 04 04 04 04 04 04 04 4D 27 02
C6 FF 39 04 04 04 04 04 04 04 39 47 56 47 56 47
56 47 56 47 56 47 56 47 56 39 05 25 06 05 25 03
05 24 03 CC FF FF 39 CE 2C FC 86 03 4D 27 0E 0F
E6 00 5C 26 01 5A E7 00 0E 08 4A 20 EF 39 41 C5
96 C7 96 C7 96 C7 96 C7 96 C7 96 C7 96 C7 96 C7
96 C7 92 7E 92 87 96 C7 96 C7 96 C7 96 C7 92 72
92 90 96 C7 96 C7 96 C7 92 99 92 B7 92 C0 93 4A
92 C9 96 C7 96 C7 96 C7 96 C7 96 C7 96 C7 8E 26
unsigned int
Address;
//PORTF
//can use PINF to read data bus
const byte pinD0 = A0;
const byte pinD1 = A1;
const byte pinD2 = A2;
const byte pinD3 = A3;
const byte pinD4 = A4;
const byte pinD5 = A5;
const byte pinD6 = A6;
const byte pinD7 = A7;
const byte pinA0 = 2;
const byte pinA1 = 3;
const byte pinA2 = 4;
const byte pinA3 = 5;
const byte pinA4 = 6;
const byte pinA5 = 7;
const byte pinA6 = 8;
const byte pinA7 = 9;
const byte pinA8 = 10;
const byte pinA9 = 11;
const byte pinA10 = 12;
const byte pinA11 = 13;
const byte pinA12 = 21;
const byte pinA13 = 20;
const byte pinA14 = 19;
const byte pinG = 18;
const byte grData[] =
{
pinD0, pinD1, pinD2, pinD3,
pinD4, pinD5, pinD6, pinD7
};
const byte grAddr[] =
{
pinA0, pinA1, pinA2, pinA3,
pinA4, pinA5, pinA6, pinA7,
pinA8, pinA9, pinA10, pinA11,
pinA12, pinA13, pinA14
};
char szStr[16];
void setup( void )
{
unsigned char
idx,
databyte;
Serial.begin(115200);
pinMode( pinG, OUTPUT );
digitalWrite( pinG, HIGH );
for( int i=0; i<8; i++ )
pinMode( grData[i], INPUT_PULLUP );
for( int i=0; i<15; i++ )
pinMode( grAddr[i], OUTPUT );
//0bx111 1111 1111 1111
Address = 0x0000;
idx = 0;
do
{
SetAddress( Address );
digitalWrite( pinG, LOW );
databyte = PINF;
digitalWrite( pinG, HIGH );
sprintf( szStr, "%02X ", databyte );
Serial.print( szStr );
idx++;
if( idx == 16 )
{
idx = 0;
Serial.println("");
}//if
Address++;
}while( Address < 0x8000 );
}//setup
void loop( void )
{
}//loop
void SetAddress( unsigned int Adr )
{
for( int i=0; i<15; i++ )
digitalWrite( grAddr[i], (Adr & (1<<i)) ? HIGH:LOW );
}//SetAddress