cannot read from EEPROM with EEPROM-i2C-Engine-object
StefanL38
Posts: 2,292
in Propeller 1
Hi,
two years ago I used the EEPROM-I2C-engine-object for a project and in this project it works as expected.
The EEPROM-I2C-Object is from Kwabena W. Agyeman who did a lot of SPIN-coding.
Now I tried to use this object for a new project but it does not work.
The doc inside the object shows pull-up-resistors on the SDA and SCL-pins.
I do not use pull-up-resistors yet.
Now I'm wondering how does the propeller-chip himself manage to communicate with my DIY-propeller-board all the time
but when I use the EEPROM-I2C-enginge-object I only get zeros when reading from the EEPROM?
I tried reading from adress 0 to 1000 and reading from adress 16.000 or 32000 which all should be accessible.
What do you think?
Do I have to change any of the parameters like
best regards
Stefan
two years ago I used the EEPROM-I2C-engine-object for a project and in this project it works as expected.
The EEPROM-I2C-Object is from Kwabena W. Agyeman who did a lot of SPIN-coding.
Now I tried to use this object for a new project but it does not work.
The doc inside the object shows pull-up-resistors on the SDA and SCL-pins.
I do not use pull-up-resistors yet.
Now I'm wondering how does the propeller-chip himself manage to communicate with my DIY-propeller-board all the time
but when I use the EEPROM-I2C-enginge-object I only get zeros when reading from the EEPROM?
I tried reading from adress 0 to 1000 and reading from adress 16.000 or 32000 which all should be accessible.
What do you think?
Do I have to change any of the parameters like
EEPROM_Address = %1010 ' EEPROM Address for device selection. EEPROM_Max_Write_Time = 5 ' EEPROM Max Write Time in milliseconds so that write page and read known when to return false. EEPROM_Size = 65536 ' EEPROM Size in bytes so that read page can properlly prevent wrap arrounds. EEPROM_Page_Size = 32 ' EEPROM Page size in bytes so that write page can properlly prevent wrap arrounds.
best regards
Stefan
Comments
You are right. I did not remember that my DIY-propeller-board had a pullup-resistor on SDA.
After adding a Pull-up-resistor to the SCL-Line the EEPROM-read-write works fine.
Thank you very much for your answer. If you haven't received a medal for very very long forum-support I suggest parallax should create one. (Or maybe a special designed Award-PCB with your favorite µControllerS on it?)
I tried some other I2C-objects from the OBEX. Chris Gadd wrote an I2C-object with demo-code that checks the SDA and SCL-Line for Pullup-resistors. Very good idea Chris. You should be honored too.
best regards
Stefan
Mike has permanent recognition via the wayback machine:
https://web.archive.org/web/20130514172417/http://www.parallax.com/Company/ParallaxContributors/tabid/696/Default.aspx
I always donate to them every year so I can find info on parts from companies that have gone out of business. I encourage forum members to do the same.
Hey, there's another familiar looking guy on that page......
https://archive.org/details/youtube-XQNivSX2RIY?start=105
Please donate. It preserves old Parallax sites too!
And a rather handsome guy at that!