Go Down

Topic: Hacking i2c EEPROM problems (Read 1 time) previous topic - next topic

AndyJarosz

Hey all,

I'm trying to hack an LED message fan, and it has an 2wire EEPROM (24co2a) and has four pins broken out to some headers. I'm assuming those headers go to the VCC, GND, clock, and Serial I/O. I've tried many sketched but my non-experience with i2c is showing.

All I want to do is read the EEPROM to see what is on it. However, any sketch I seem to try only gives me little squares or nonsense letters of the type I usually see when I have my baud rate set wrong. However, everything checks out, but I just can't seem to read it!

Is there an "hello world" equivalent for reading an EEPROM? Nothing fancy, just open serial and have it read? What else could I be doing wrong?

CrossRoads

You may just be reading out non-printable characters.
Can you show the data as raw binary, or hex?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

AndyJarosz

By changing what I read from a byte to an int, I get the following:

Code: [Select]
254
254
255
255
255
8
223
126
8
126
254
254
8
8
255
239
121
127
126
255
110
8
251
127
255
137
62
8
126
8
0
0
0
0
0
0
0
254
254
223
126
126
126
8
126
235
255
110
238
127
238
126
158
239
136
254
255
8
126
252
255
8
137
255
253
121
238
0
0
0
0
0
0


Repeated over and over. Now, I'm not sure if this is actually what's on there or it's relevance to an LED POV fan, but It's interesting no number goes over 255...

CrossRoads

Most memory parts are arranged as bytes, hard to get above 255 with just bits 8)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

AndyJarosz

You know those moments where you go,

"Oh. Oh."

I just had one of those.

Anyways, now what? So I know I have the data, which is awesome, I'm happy. But is there any possible way to actually tell if this is relevant to what I'm trying to do, or am I just the proud owner of a series of bytes?

CrossRoads

"I'm trying to hack an LED message fan"
I don't know what that is.

"All I want to do is read the EEPROM to see what is on it"
So now you know.

What do the bytes mean? Damned if I know.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

robtillaart

don't know ...

Guessing mode
-------------------
the number 8 appears quite often as if it was some sort of separator...

If I builded a LED message fan I would use an EEPROM for:

- text  => the codes don't imply ASCII as ASCII characters are all below 128  - http://www.asciitable.com/ -
- timing information when to put LEDS ON/OFF => difficult to verify
- Font information?

The latter can be tested by writing the byte's in binary format as 1's and 0's under each other
How many leds are there on the LEDfan?
This might be an indication of the font size (7 leds => 7x8 fontsize)

For the rest I can't think of anything.

Rob
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up