Pages: [1]   Go Down
Author Topic: Hacking i2c EEPROM problems  (Read 1366 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 435
Posts: 23601
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You may just be reading out non-printable characters.
Can you show the data as raw binary, or hex?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
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...
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 435
Posts: 23601
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Most memory parts are arranged as bytes, hard to get above 255 with just bits smiley-cool
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 435
Posts: 23601
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"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.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 168
Posts: 12423
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Tillaart

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

Pages: [1]   Go Up
Jump to: